Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

multiple parms in step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
mchanapa

New User


Joined: 17 Nov 2011
Posts: 36
Location: India

PostPosted: Wed Feb 29, 2012 5:31 pm    Post subject: multiple parms in step
Reply with quote

Hi,

I am trying to give two parms in a proc step(mentioned as below), but it is considering only first parm and ignoring the second. Can anyone help me in what way I can use the two parms in the same step.

Code:
PARM='&TBLUPD0/&CM1 &CM2,/ALL31(ON),STACK(,,ANY)'
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Wed Feb 29, 2012 7:14 pm    Post subject: Reply to: multiple parms in step
Reply with quote

You will have to be much clearer. You know what you are saying, but we don't. We don't know what program you are executing, nor what you consider to be the first or second PARM. It all looks like one PARM to me, possibly two values seperated by space, and from what you describe maybe the space is the problem. Complete guess.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Wed Feb 29, 2012 7:22 pm    Post subject:
Reply with quote

well if all else fails,
one could look at the reference manual for parameter syntax

but then that would involve actually doing something on one's own time,
instead of expecting someone else to do your work
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10277
Location: italy

PostPosted: Wed Feb 29, 2012 7:29 pm    Post subject: Reply to: multiple parms in step
Reply with quote

do not use the slashes for USER parms separation
unless You know exactly whatYou are doing

the behavior You complain about is not the one expected , but Yo might have described it poorly

if the program is not invoked directly by a jcl EXEC statement the behavior might be different ( db2 and ims might be doing their parameter mangling too )

for HLL a forward slash is e used to separate the sections for the user parms and the LE/HLL environment parms
anything after the LAST slash is passed to the HLL/LE environment processing

but if the HLL/LE data is not a proper parameter the whole string is passed to the program as parms

naturally all depends on how Your environment is setup
( if the COBOL and PL1 are setup not to accept overrides )

checked with a quick and dirty snippet

Code:
 ****** ***************************** Top of Data ******************************
 000001        IDENTIFICATION DIVISION.                                         
 000002        PROGRAM-ID     PARMS.                                           
 000003        AUTHOR.        <SOME AUTHOR>                                     
 000004        ENVIRONMENT    DIVISION.                                         
 000005        DATA           DIVISION.                                         
 000006        WORKING-STORAGE SECTION.                                         
 000007        LINKAGE         SECTION.                                         
 000008        01 ARGS.                                                         
 000009           05 ARGL         PIC S9(04) COMP.                             
 000010           05 ARGV         PIC X(100).                                   
 000011        PROCEDURE      DIVISION USING ARGS .                             
 000012            DISPLAY 'ARG LENGTH  :' ARGL .                               
 000013            IF ARGL > 0                                                 
 000014            DISPLAY 'ARG VALUE   :' ARGV .                               
 000015            GOBACK.                                                     
 ****** **************************** Bottom of Data ****************************


forget about the ARGV content
what counts is the ARGL

tested with ...

Code:
 ****** ***************************** Top of Data ******************************
 000001 //ENRICO1  JOB (ACCT#),'PARMS$',NOTIFY=ENRICO,                         
 000002 //             CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1)                       
 000003 //*                                                                     
 000004 //PARMS   EXEC PGM=PARMS,PARM='AAAA/BB/HEAP(32)'                       
 000005 //STEPLIB   DD DISP=SHR,DSN=ENRICO.TEST.LOAD                           
 000006 //SYSPRINT  DD SYSOUT=*                                                 
 000007 //SYSOUT    DD SYSOUT=*                                                 
 ****** **************************** Bottom of Data ****************************


to receive

Code:
********************************* TOP OF DATA **********************************
ARG LENGTH  :0007                                                               
ARG VALUE   :AAAA/BB/HEAP(32)                                                   
******************************** BOTTOM OF DATA ********************************


as expected

but ...

Code:
 ****** ***************************** Top of Data ******************************
 000001 //ENRICO1  JOB (ACCT#),'PARMS$',NOTIFY=ENRICO,                         
 000002 //             CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1)                       
 000003 //*                                                                     
 000004 //PARMS   EXEC PGM=PARMS,PARM='AAAA/GARBAGE'                           
 000005 //STEPLIB   DD DISP=SHR,DSN=ENRICO.TEST.LOAD                           
 000006 //SYSPRINT  DD SYSOUT=*                                                 
 000007 //SYSOUT    DD SYSOUT=*                                                 
 ****** **************************** Bottom of Data ****************************

gives
Code:
********************************* TOP OF DATA **********************************
CEE3608I The following messages pertain to the invocation command run-time optio
CEE3611I The run-time option GARBAGE was an invalid run-time option or is not su
         Environment.                                                           
ARG LENGTH  :0012                                                               
ARG VALUE   :AAAA/GARBAGE                                                       
******************************** BOTTOM OF DATA ********************************



developing and running such simple snippets is the best way to understand how things work
it' a pity that nobody has the ingenuity of doing it
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Restart=Step not working ALAK SAHA JCL & VSAM 6 Fri Jun 30, 2017 6:28 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us