Passing parameter from JCL to Proc



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Passing parameter from JCL to Proc

Postby Prasanna G » Tue Jul 31, 2012 1:00 pm

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.
User avatar
Prasanna G
 
Posts: 68
Joined: Tue Apr 12, 2011 9:49 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Passing parameter from JCL to Proc

Postby BillyBoyo » Tue Jul 31, 2012 1:38 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Passing parameter from JCL to Proc

Postby Prasanna G » Tue Jul 31, 2012 2:35 pm

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.
User avatar
Prasanna G
 
Posts: 68
Joined: Tue Apr 12, 2011 9:49 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Passing parameter from JCL to Proc

Postby BillyBoyo » Tue Jul 31, 2012 2:56 pm

Try putting quotes around the commas before CAAFCEX.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Passing parameter from JCL to Proc

Postby NicC » Tue Jul 31, 2012 10:49 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Passing parameter from JCL to Proc

Postby Prasanna G » Wed Aug 01, 2012 12:24 pm

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.
User avatar
Prasanna G
 
Posts: 68
Joined: Tue Apr 12, 2011 9:49 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Passing parameter from JCL to Proc

Postby dick scherrer » Wed Aug 01, 2012 9:32 pm

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. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Passing parameter from JCL to Proc

Postby Prasanna G » Wed Aug 01, 2012 9:48 pm

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.
User avatar
Prasanna G
 
Posts: 68
Joined: Tue Apr 12, 2011 9:49 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Passing parameter from JCL to Proc

Postby dick scherrer » Wed Aug 01, 2012 10:18 pm

Hello,

Understood. . . Bummer.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post