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

multiple parms in step


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Feb 29, 2012 7:14 pm
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: 6966
Location: porcelain throne

PostPosted: Wed Feb 29, 2012 7:22 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Feb 29, 2012 7:29 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Grouping by multiple headers DFSORT/ICETOOL 7
Search our Forums:

Back to Top