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

Unable to pass the value through JCL in a IMS program


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
akashs

New User


Joined: 24 Nov 2005
Posts: 49
Location: chennai

PostPosted: Fri Nov 04, 2011 9:46 pm
Reply with quote

Hi,

i have the below PROC(MEBHV10) step,

//PS0020 EXEC PGM=DFSRRC00,PARM='DLI,HEOPAGM,HEOPAGM,&FLAG'

and iam passing the value to this symbolic parameter FLAG from the below JCL step,

//JS0010 EXEC PROC=MEBHV10,FLAG=T

In the linkage section of the program ,
I have declared as below,

Linkage section
01 PARM-EXT.
05 PARM-LEN PIC S9(4) COMP.
05 PARM-TEXT PIC X(1).

iam getting the error U0642 while executing the RUN JCL.

Please help me out in this regard.

Thanks,
akash
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Nov 04, 2011 10:28 pm
Reply with quote

Are you specifying "USING PARM-EXT" in the PROCEDURE DIVISION?

The maximum parm-jcl length is 100, so instead of restricting yourself by defining it as 1-byte, make it 100 and address the parm-data using reference-modification and the parm-length halfword.

But, the program needs to check for the presence of a parm, by checking the parm-length for greater than zero.

Mr. Bill
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Fri Nov 04, 2011 10:34 pm
Reply with quote

You can't override an individual element within a PARM that way.
You could, on the other hand, override the entire PARM - to wit:

//JS0010 EXEC PROC=MEBHV10,PARM='DLI,HEOPAGM,HEOPAGM,T'

Alternatively, the following would also work:

// SET FLAG=T
//JS0010 EXEC PROC=MEBHV10
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Fri Nov 04, 2011 11:06 pm
Reply with quote

DFSRRC00 has very specific parameter requirements. Search the forum for the keyword APARM.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sat Nov 05, 2011 2:29 pm
Reply with quote

IMS is a differnt animal than your only COBOL batch program. One starts IMS (DFSRRC00) and not the program executing the logic. DFSRRC00 invokes the 'logic program' like it were a submodule but without any knowledge about parameters to be passed to thad module. The solution depends on the type of program; with DC create a startup screen where you may enter the parameters which are sent in a message and can be intepreted by the 'startup' transaction.

But with DB, to pass 'user parameters', you may use a database, sysin or any OS-file containing the needed information for your program.
Back to top
View user's profile Send private message
akashs

New User


Joined: 24 Nov 2005
Posts: 49
Location: chennai

PostPosted: Sun Nov 06, 2011 1:06 am
Reply with quote

Tried all above solution what you guys gave..But still i got the abend code -U0643. Can u pls help me out

Thanks
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sun Nov 06, 2011 1:24 am
Reply with quote

I Googled "DFSRRC00" and got 3,000 hits.

You'd be astonished what you can accomplish via independent research.... icon_rolleyes.gif

Mr. Bill
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Sun Nov 06, 2011 2:20 am
Reply with quote

akashs wrote:
Tried all above solution what you guys gave..But still i got the abend code -U0643. Can u pls help me out

Thanks
Did you search the forum for "APARM"? This question has been answered many times.
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 Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Dynamically pass table name to a sele... DB2 2
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top