ganeshptrk
New User
Joined: 04 Apr 2007 Posts: 17 Location: Chennai
|
|
|
|
Hi,
Can anyone give me an example to capture the parameters passed through JCL PARM to a Assembler program.
For example
//STEP0001 EXEC PGM=ASMPGM, PARM='1,2,3,4,5'
I want to capture above PARM values in my Assembler program.
thanks |
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
Your Assembler-Rrogramm will receive the Parm via Register-One.
The first HalfWord specifies the length of the Parm, passed to the programm. So the first, the programm has to do, after beeing entered, is check length and store the parm.
L R3,0(r1) ...load Parm
SR R2,R2 ...clear reg-2
LH R2,0(R3) ...load length
LTR R2,R2 ...chck length
BZ ...No_Parm
BCTR R2,0 ...length - 1
EX R2,EX_MVC ...move Parm in Field
EX_MVC MVC Parm_Field,2(R3)
Hope it helps, regards, UmeySan |
|