Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OORexx and Regina

0 views
Skip to first unread message

Xizor

unread,
Jul 21, 2008, 12:10:50 PM7/21/08
to
I have the following OORexx-script and need it to convert to regina.
Any suggestions?

date1=date('S')
time1=time('N') /* hh:mm:ss */
parse var time1 hh':'mm':'ss
hhmmss=hh||mm||ss
datetime=date1||hhmmss

wrongdat = .stream~new( 'd:\foo\wrongdatcollect.txt' )
wrongdat~lineout( '############# S T A R T :' DATE() TIME()
'####################')
rightdat = .stream~new('d:\foo\withoutwrong'datetime'.txt')
origdat=.stream~new( 'd:\foo\origdata.txt' )

do while origdat~lines <> 0
origdaten = origdat~linein

If LEFT(origdaten,7) = 'XXXYYY1' Then

wrongdat~lineout(origdaten)

Else

rightdat~lineout(origdaten)

end /*do*/

Thanks,
Xi

Gil Barmwater

unread,
Jul 21, 2008, 1:36:15 PM7/21/08
to
This turns out to be very straightforward. See the replacement lines below.

Xizor wrote:
> I have the following OORexx-script and need it to convert to regina.
> Any suggestions?
>
> date1=date('S')
> time1=time('N') /* hh:mm:ss */
> parse var time1 hh':'mm':'ss
> hhmmss=hh||mm||ss
> datetime=date1||hhmmss
>
> wrongdat = .stream~new( 'd:\foo\wrongdatcollect.txt' )

wrongdat = 'd:\foo\wrongdatcollect.txt'


> wrongdat~lineout( '############# S T A R T :' DATE() TIME()
> '####################')

call lineout wrongdat, '############# S T A R T :' DATE() TIME()
'####################'


> rightdat = .stream~new('d:\foo\withoutwrong'datetime'.txt')

rightdat = 'd:\foo\withoutwrong'datetime'.txt'


> origdat=.stream~new( 'd:\foo\origdata.txt' )

origdat = 'd:\foo\origdata.txt'
>
> do while origdat~lines <> 0
do while lines(origdat) <> 0
> origdaten = origdat~linein
origdaten = linein(origdat)


>
> If LEFT(origdaten,7) = 'XXXYYY1' Then
>
> wrongdat~lineout(origdaten)

call lineout wrongdat, origdaten
>
> Else
>
> rightdat~lineout(origdaten)
call lineout rightdat, origdaten
>
> end /*do*/
>
> Thanks,
> Xi

Xizor

unread,
Jul 21, 2008, 2:40:13 PM7/21/08
to
Thanks! Worked!
0 new messages