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
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