View previous topic :: View next topic
|
Author |
Message |
rama velati
New User
Joined: 27 Feb 2008 Posts: 5 Location: india
|
|
|
|
I have written a rexx routine to read a JCL and find a particular string and move that to a array (stem variable)
when i display the stem the required value appears, but when i write it to the DS i am getting an empty one, why is this. the rexx is given below
Code: |
...
i = 0
l = 0
"EXECIO * DISKR in (STEM input."
name. =""
do j = 1 to input.0
len = length(input.j)
string1 = SUBSTR(input.j,1,5)
if string1 = 'LOGON' then
i = j
else
if i \= 0 then
do
name.l = input.j
say name.l
"EXECIO * DISKW out (FINIS"
i = 0
end
end
|
|
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
You should use
Code: |
PSYCHICIO * DISKW out(FINIS |
to write the item, as that would probably be able to guess what you want to write out. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Use the same syntax as you did to READ a file. |
|
Back to top |
|
|
rama velati
New User
Joined: 27 Feb 2008 Posts: 5 Location: india
|
|
|
|
i have
"EXECIO * DISKW out(STEM name."
i want to write the matched records to a new file, for this i have created a new stem name. and i am moving values, but nothing gets written to the DS.
strange also, if is display name. before the EXECIO, i get the data, but if i write after the EXECIO, i get blank.
why is the output stem not written to the DS? |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
RTFM
The REXX manual has a very detailed explanation about the EXECIO "DISKW" function! |
|
Back to top |
|
|
anjali_tcs
New User
Joined: 09 Jun 2008 Posts: 10 Location: GGN
|
|
|
|
Rama -
Can i see your latest code....as much as i know of REXX
"EXECIO * DISKW out (STEM name."
should get you some thing (not necessarily what u are looking for) in the output file.
Thanks,
AB. |
|
Back to top |
|
|
rama velati
New User
Joined: 27 Feb 2008 Posts: 5 Location: india
|
|
|
|
hi,
no nothing gets written, but if i say
"EXECIO * DISKW OUT(STEM input." (input. is the stem variable for the input jcl, the complete jcl gets written
but when i change it to
"EXECIO * DISKW OUT(STEM name."
nothing is |
|
Back to top |
|
|
anjali_tcs
New User
Joined: 09 Jun 2008 Posts: 10 Location: GGN
|
|
|
|
i think you are intializing the 0 element (i.e. l=0) of your stem variable (name) with the text.
Zero th element of the stem contains the count of elements in the stem.
You should have l initialized to 1 and then check...
Hopefully it will work.
Thanks,
AB. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Your statement name. = "" should probably be drop name.
You assign the value into name.L -- where is L set other than in the 2nd line where it is set to zero? EXECIO will not write out the zero-th item.
EXECIO will output details from name.1 until it reaches a null name.
Garry. |
|
Back to top |
|
|
rama velati
New User
Joined: 27 Feb 2008 Posts: 5 Location: india
|
|
|
|
thnx, finally worked |
|
Back to top |
|
|
|