IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

JCL PARM processing in Assembler


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ganeshptrk

New User


Joined: 04 Apr 2007
Posts: 17
Location: Chennai

PostPosted: Wed Feb 27, 2008 11:58 am
Reply with quote

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
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Wed Feb 27, 2008 2:08 pm
Reply with quote

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
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts JCL EXEC PARM data in C Java & MQSeries 2
No new posts Need to specify PARM='POSIX(ON) Java & MQSeries 4
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Build dataset list with properties us... PL/I & Assembler 4
No new posts Finding Assembler programs PL/I & Assembler 5
Search our Forums:

Back to Top