Loop

This is a discussion on Loop within the REXX forums in Programming Languages category; DAT01 = 'D:\foobar\TST\' DAT02 = 'foo1\' DAT03 = 'foo2\' DAT04 = 'foo3\' DAT30 = 'send\' DAT31 = 'receive\' DAT32 = 'archiv\' DAT42 = foo1 DAT43 = foo2 DAT44 = foo3 DAT50 = 'D:\foobar\TST\tmp\' DAT51 = send DAT52 = receive ddat=date('s') 'd:' 'cd' DAT01 'dir' DAT01||DAT02||DAT32||DAT30 '| rxqueue' do queued() parse pull line If left(line,10) <> ' ' then call lineout(DAT50'hilfe1.txt'),line end .... How can I make a loop such as DAT02 is changed automatically to DAT03 etc.?...

Go Back   Application Development Forum > Programming Languages > REXX

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-27-2008, 01:06 PM
Xizor
Guest
 
Default Loop

DAT01 = 'D:\foobar\TST\'
DAT02 = 'foo1\'
DAT03 = 'foo2\'
DAT04 = 'foo3\'
DAT30 = 'send\'
DAT31 = 'receive\'
DAT32 = 'archiv\'
DAT42 = foo1
DAT43 = foo2
DAT44 = foo3

DAT50 = 'D:\foobar\TST\tmp\'
DAT51 = send
DAT52 = receive

ddat=date('s')

'd:'
'cd' DAT01
'dir' DAT01||DAT02||DAT32||DAT30 '| rxqueue'
do queued()
parse pull line
If left(line,10) <> ' ' then
call lineout(DAT50'hilfe1.txt'),line
end
....

How can I make a loop such as DAT02 is changed automatically to DAT03
etc.?
Reply With Quote
  #2  
Old 08-28-2008, 10:35 PM
Richard Brady
Guest
 
Default Re: Loop

See what I'd try interspersed with your code.

Xizor wrote:
> DAT01 = 'D:\foobar\TST\'
> DAT02 = 'foo1\'
> DAT03 = 'foo2\'
> DAT04 = 'foo3\'
> DAT30 = 'send\'
> DAT31 = 'receive\'
> DAT32 = 'archiv\'
> DAT42 = foo1
> DAT43 = foo2
> DAT44 = foo3
>
> DAT50 = 'D:\foobar\TST\tmp\'
> DAT51 = send
> DAT52 = receive
>
> ddat=date('s')
>

data_dir = DAT02 DAT03 DAT04
> 'd:'
> 'cd' DAT01

do ix = 1 to 3
ddir = word(data_dir,ix);
> /* 'dir' DAT01||DAT02||DAT32||DAT30 '| rxqueue'*/

'dir' DAT01||ddir||DAT32||DAT30 '| rxqueue'
> do queued()
> parse pull line
> If left(line,10) <> ' ' then
> call lineout(DAT50'hilfe1.txt'),line
> end

end
> ...
>
> How can I make a loop such as DAT02 is changed automatically to DAT03
> etc.?


And there are other ways.

Regards,
rlbrady
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 08:37 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.