View previous topic :: View next topic
|
Author |
Message |
murugan_mf
Active User
Joined: 31 Jan 2008 Posts: 148 Location: Chennai, India
|
|
|
|
Hi,
I'm writing the string murugan in a PS three times. Pelase find the below code. The code is sucessful while running, but when I open that PS, it is empty.
Please let me know where I'm wrong. Initially, ALLOC of that PS is given correctly.
Code: |
.
.
.
DO J = 1 TO 3
OUTREC = 'MURUGAN'
SAY OUTREC
"EXECIO * DISKW MYOUTD (STEM OUTREC"
END
.
.
.
|
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
You did not use a stem variable. |
|
Back to top |
|
|
murugan_mf
Active User
Joined: 31 Jan 2008 Posts: 148 Location: Chennai, India
|
|
|
|
Thanks for your reply.
That's not a STEM variable.
When I use
Code: |
"EXECIO * DISKW MYOUTD (OUTREC" |
I'm getting this error.
Code: |
IRX0617E EXECIO error. Unrecognized or ambiguous keyword option found. |
Please let me know how to correct it. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
First, a link to the documentation for the EXECIO command.
There are a bunch of methods you could use to obtain your desired results. Here are a few:
Code: |
/* REXX */
...
Do j = 1 To 3
Interpret outrec||j "=" 'MURUGAN'
End
"EXECIO * DISKW myoutd (STEM outrec FINIS"
...
Do j = 1 To 3
outrec.j = 'MURUGAN'
End
"EXECIO * DISKW myoutd (STEM outrec. FINIS"
...
outrec = 'MURUGAN'
Do j = 1 To 3
Queue outrec
End
"EXECIO * DISKW myoutd (FINIS"
...
outrec = 'MURUGAN'
Do j = 1 To 3
Queue outrec
End
"EXECIO "Queued()" DISKW myoutd (FINIS"
...
Do j = 1 To 3
outrec = 'MURUGAN'
Queue outrec
"EXECIO 1 DISKW myoutd"
End
"EXECIO 0 DISKW myoutd (FINIS"
...
outrec = 'MURUGAN'
Do j = 1 To 3
Push outrec
End
"EXECIO 3 DISKW myoutd (FINIS"
...
|
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
I prefer the stem approach:
Code: |
Do j = 1 To 3
outrec.j = 'MURUGAN'
End
"EXECIO * DISKW myoutd (STEM outrec. FINIS" |
For the queue examples, I think you should use a new stack
Code: |
NEWSTACK
outrec = 'MURUGAN'
Do j = 1 To 3
Queue outrec
End
"EXECIO * DISKW myoutd (FINIS"
DELSTACK
|
|
|
Back to top |
|
|
|