| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| 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 |
|
#2
| |||
| |||
| 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 |
|
#3
| |||
| |||
| Thanks! Worked! |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.