View previous topic :: View next topic
|
Author |
Message |
husj
New User
Joined: 05 Sep 2005 Posts: 12 Location: P.R.C
|
|
|
|
Hi,
I want to exec one cobol program for many times in a JOB. Everytime, the program will receive a changing value from JOB. How to do ?
thanks®ards
Jerry |
|
Back to top |
|
|
rajesh_1183
Active User
Joined: 24 Nov 2005 Posts: 121 Location: Tadepalligudem
|
|
|
|
Hi jerry,
Try using parm parameter in the jcl...
//step1 exec=pgmname,parm=value-for-the-variable1
next declare this variable in the linkage section of the program..
linkage section
01 abcd.
02 variable-len pic s9(4) comp.
02 variable1 pic x(10).
try this....
correct me if i am wrong.....
Thanks,
Rajesh |
|
Back to top |
|
|
nrsmca
New User
Joined: 25 May 2005 Posts: 14
|
|
|
|
1. U should pass value using file from JCL.
2. U open file in I-O mode in prgm.
3. Read ur input record from that file process it and Rewrite the record of it for using next time running same ur prgm.
Ex:-
First time U wants to run ur prgm. With today date, second time tomorrow date,...ect.
In this case read today date from file and using for all process and finally increased by 1 day and rewrite it...!
Thanks,
nrsmca |
|
Back to top |
|
|
puneet_ashok
New User
Joined: 11 Jan 2006 Posts: 1
|
|
|
|
hi
u can pass any parameter through jcl to a cobol program using parm parameter...
in ur linkage section
01 parm
05 parm-length pic s9(4) comp.
05 parm-value pic 9(4).
now u can pass a variable of size 4
jcl:
//parm exec pgm=urpgmname,
// parm='0001'
if u want to add any parameter then u can add and pass the parameter as a concatenated value....
-------------------
Puneet
------------------ |
|
Back to top |
|
|
|