OORexx and Regina

This is a discussion on OORexx and Regina within the REXX forums in Programming Languages category; 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...

Go Back   Application Development Forum > Programming Languages > REXX

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-21-2008, 12:10 PM
Xizor
Guest
 
Default OORexx and Regina

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
Reply With Quote
  #2  
Old 07-21-2008, 01:36 PM
Gil Barmwater
Guest
 
Default Re: OORexx and Regina

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

Reply With Quote
  #3  
Old 07-21-2008, 02:40 PM
Xizor
Guest
 
Default Re: OORexx and Regina

Thanks! Worked!
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 08:44 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.