View previous topic :: View next topic
|
Author |
Message |
Velkumar
New User
Joined: 23 Apr 2007 Posts: 18 Location: India
|
|
|
|
Hi
Is it possible to pass an array thorugh PARM parameter in JCL. If so then how to define it in the linkage section.
One more query is it possible to pass an index via PARM parmeter. |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
You can pass data from JCL thru PARM. In linkage it really depends on how you want to use the data, you can define as array in linkage. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please post an example of the array data you want to pass form JCL into the program.
Please clarify what you mean by "pass an index" with an example of that also. |
|
Back to top |
|
|
Velkumar
New User
Joined: 23 Apr 2007 Posts: 18 Location: India
|
|
|
|
Hi Dick
In PARM parameter I want to pass it like this 2848586878
But in the program it has to store as subscripts of 5.
For eg A(1) will contain 28
A(2) will contain 48
A(3) will contain 58
and so on.
Reg the index
We can declare the array by
02 A PIC X(10) occurs 8 times indexed by ws-index1
If we pass parm parameter as 1 can we use it for the index variable Ws-index1
Hope this describes more. |
|
Back to top |
|
|
Nimesh.Srivastava
New User
Joined: 30 Nov 2006 Posts: 78 Location: SINGAPORE
|
|
|
|
Velkumar,
You can try passing the parameters like "28|48|58|68|78" if the individual parameters are not of fixed length or "2848586878" and then read the parameter as character string and breaking into individual number each 2 chars in length.
Hope this helps
Nimesh |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Do you want to pass the values of the array and the index into the array into the program? If you are passing the array into the program as a parm what does this "pass parm parameter as 1" mean?
I am confused as to what your requirement is. I'm also not sure how adding "|" between your array values might help. . .
If you describe the process more clearly, we may be able to offer suggestions.
When your process does what you want, what will it do? A description of that may help. |
|
Back to top |
|
|
|