Page 1 of 1

Passing parameter from JCL to Proc

PostPosted: Tue Jul 31, 2012 1:00 pm
by Prasanna G
Hi

I have difficulty in passing a parm 'CASCPEX,CAAFCEX' along with quotes to DBCAEXIT program.
Below are the description of the issue.

The proc has the following Symbolics

SSID=DQA0,
PLAN=KBBBATD3,
DBPARM=,
QT=''''


PGM=IKJEFT1B,DYNAMNBR=20,
PARM=('%DB2BATCH,'SYS(&SSID)','PROG(DBCAEXIT)',
'PLAN(&PLAN)','PARM(&QT.&DBPARM.&QT)')


The JCL has DBPARM='CASCPEX,CAAFCEX' passed to the proc. I am getting the symbolics substitued as below.

PGM=IKJEFT1B,DYNAMNBR=20,
PARM=(%DB2BATCH','SYS(DQA0)','PROG(DBCAEXIT)',
'PLAN(KBBBATD3)','PARM('CASCPEX,CAAFCEX')')


But on executing the above proc from the jobs am getting the below error

IEFC629I INCORRECT USE OF APOSTROPHE ON THE EXEC STATEMENT
IEFC629I INCORRECT USE OF APOSTROPHE ON THE EXEC STATEMENT
IEFC629I INCORRECT USE OF PARENTHESIS ON THE EXEC STATEMENT
IEFC629I INCORRECT USE OF APOSTROPHE ON THE EXEC STATEMENT
IEFC622I UNBALANCED PARENTHESES ON THE EXEC STATEMENT


Can some one help me on this?

Thank You
Regards
Prasanna G.

Re: Passing parameter from JCL to Proc

PostPosted: Tue Jul 31, 2012 1:38 pm
by BillyBoyo
It looks like in the original part, the apostrophe is for "protecting" the commas. You have used it differently, and also introduced an extra right-bracket/parentesis.

Re: Passing parameter from JCL to Proc

PostPosted: Tue Jul 31, 2012 2:35 pm
by Prasanna G
Hi

If I donot have &QT coded, then the parm will look like below:

PGM=IKJEFT1B,DYNAMNBR=20,
PARM=(%DB2BATCH','SYS(DQA0)','PROG(DBCAEXIT)',
'PLAN(KBBBATD3)','PARM(CASCPEX,CAAFCEX)')


There by DBCAEXIT is ignoring CAAFCEX and it takes only CASCPEX as the parm.
Please let me know if anything is not clear.

Re: Passing parameter from JCL to Proc

PostPosted: Tue Jul 31, 2012 2:56 pm
by BillyBoyo
Try putting quotes around the commas before CAAFCEX.

Re: Passing parameter from JCL to Proc

PostPosted: Tue Jul 31, 2012 10:49 pm
by NicC
In the first block of code you posted your parm starts like this
PARM=('%DB2BATCH,
but in the second block it starts
PARM=(%DB2BATCH',
- note where the first quote is. If this is a typo please do not retype but cut and paste - including the // at the start of each line of JCL. s a result I cannot determine where you have gone wrong. You should also include the EXEC or SET statement where you are specifying these parameters.

Re: Passing parameter from JCL to Proc

PostPosted: Wed Aug 01, 2012 12:24 pm
by Prasanna G
Hi NicC

I have PARM='%DB2BATCH', in the PROC. The reason why I typed is, I wont be able to copy paste the code as I am using Citrix for connecting to client network.

Re: Passing parameter from JCL to Proc

PostPosted: Wed Aug 01, 2012 9:32 pm
by dick scherrer
Hello,

How do you access your system remotely? Is this connection Citrix or possibly a 3270 emulator on your pc?

I don't "do" Citrix, but i've not yet had trouble using copy/paste on a Win-based client. . .

Re: Passing parameter from JCL to Proc

PostPosted: Wed Aug 01, 2012 9:48 pm
by Prasanna G
Hi Dick

I access mainframes using a secure connection where internet is not accessible and copying pasting from that window to my local PC where I can access internet is not possible. Hope I am clear with the above explanation.

Re: Passing parameter from JCL to Proc

PostPosted: Wed Aug 01, 2012 10:18 pm
by dick scherrer
Hello,

Understood. . . Bummer.