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
 

 

JCL - COBOL IMS - Parm issue

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
View previous topic :: :: View next topic  
Author Message
vinu78

Active User


Joined: 02 Oct 2008
Posts: 129
Location: India

PostPosted: Fri Jun 25, 2010 10:05 pm    Post subject: JCL - COBOL IMS - Parm issue
Reply with quote

Hi,

I want to execute the IMS Batch program wherein I need to pass 'TRAN' through JCL that is used inside the IMS-COBOL program. The problem is that when calling IMS COBOL pgm through JCL, we need to pass module name also in PARM and my needed parm 'TRAN' is not correctly passed to COBOL.

Code:
JCL
//TEST1A EXEC PGM=DFSRRC00,PARM='DLI,cobol pgm,PSB name','TRAN'

Code:
COBOL pgm

LINKAGE SECTION
01  MCPCB.                                                 
  03  PCB-DBDNM       PIC X(8).                           
  03  PCB-SEGLV       PIC XX.                             
  03  PCB-STATUS      PIC XX.                             
  03  PCB-PROCOPT     PIC X(4).                           
  03  PCB-RESRV       PIC S9(5)           COMP.
  03  PCB-SEGNM       PIC X(8).                           
  03  PCB-LENFB       PIC S9(5)          COMP.
  03  PCB-SENSG       PIC S9(5)          COMP.

01  WS-LINKAGE-PARMS.                                     
    05  WS-LINK-PARM-LEN                PIC S9(4) COMP.   
    05  WS-LINK-PARM.                                 
         10  WS-LINK-RUN                   PIC X(4).         
                                       
PROCEDURE DIVISION USING WS-LINKAGE-PARMS.
     ENTRY 'DLITCBL' USING MCPCB.


I am not able to get the value 'TRAN' in the WS-LINKAGE-PARMS.
I am thinking something is wrong in the parm syntax in JCL ?
Please help ?

Thanks
Vinu
Back to top
View user's profile Send private message

vinu78

Active User


Joined: 02 Oct 2008
Posts: 129
Location: India

PostPosted: Tue Jun 29, 2010 12:18 am    Post subject: Reply to: JCL - COBOL IMS - Parm issue
Reply with quote

Hi all,

Could anyone of you please help me in resolving the Parm issue mentioned above ?

Thanks
Vinu
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jun 29, 2010 12:37 am    Post subject:
Reply with quote

Hello,

Maybe you should consider using a SYSIN DD for this data rather than a PARM. . .?

Unfortunately i don't "do" ims and don't know how this might be done with an ims program. . .
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Jun 29, 2010 12:38 am    Post subject:
Reply with quote

PARM=subparameter
PARM=(subparameter,subparameter)
PARM=('subparameter',subparameter)
PARM='subparameter,subparameter'
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jun 29, 2010 12:45 am    Post subject:
Reply with quote

Hello,

I believe ims intercepts the parm and it is not given to the linkage section field(s).
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Jun 29, 2010 1:36 am    Post subject:
Reply with quote

Procedure Division using IO-PCB DB-PCB-Mast DB-PCB-Detail.
...
Figure 7. Sample COBOL program
...
Notes to Figure 7:
...
This is the standard procedure division statement of a batch program. After IMS has loaded the PSB for the program, IMS passes control to the application program. The PSB contains all the PCBs that are defined in the PSB. The coding of USING on the procedure division statement references each of the PCBs by the names that the program has used to define the PCB masks in the linkage section. The PCBs must be listed in the order in which they are defined in the PSB.
?
So the parms passed to DFSRRC00 are not the parms expected by the application program?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jun 29, 2010 2:20 am    Post subject:
Reply with quote

Hi Guy,

Quote:
So the parms passed to DFSRRC00 are not the parms expected by the application program?
If i understand the original question, yes. . .

There is an additional 4 bytes of "user data" in addition to the "ims data".

In some situations (ie. LE) program-specific parm data can be placed after a slash (/) but i don't know if this will work with ims. As i don't have ims available, i can't run a little test.
Back to top
View user's profile Send private message
vinu78

Active User


Joined: 02 Oct 2008
Posts: 129
Location: India

PostPosted: Tue Jun 29, 2010 2:58 am    Post subject:
Reply with quote

Yes D.sch.
My question is whether we can pass additional 4 bytes in addition to IMS parmlibs

We don't need to explicitely tell the PROCEDURE DIVISION USING when we are passing only IMS parmlibs. However if we need to pass data (nt related to IMS), we need to specify and it is not allowing me to do so.

I will do some trial and error and if I get the result, will let the group know abt it.

Thanks
Vinu
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Jun 29, 2010 12:20 pm    Post subject:
Reply with quote

The following is maybe usefull :

Use the APARM= parameter to specify execution-time parameters unique to this dependent region. This parameter specifies a character string for the application program or Data Capture exit routine. For batch or BMP regions, the APARM= can used to pass parameters to the Data Capture exit routine to indicate whether the data should be captured.
The maximum length of the parameter is 32 characters; the parameter must be enclosed in single quotes (') if special characters are used; embedded commas are not allowed. The INQY call with the ENVIRON subfunction is used to receive the APARM character string.

Parameters for IMSBATCH (DFSRRC00) are described in :

IMS Installation Volume 2: System Definition and Tailoring GC18-7823-03
Back to top
View user's profile Send private message
vinu78

Active User


Joined: 02 Oct 2008
Posts: 129
Location: India

PostPosted: Tue Jun 29, 2010 8:21 pm    Post subject:
Reply with quote

Hi Peter,

Could you please pass me the sysntax of APARM and how to put it along with the existing JCL card.

Code:
//TEST1A EXEC PGM=DFSRRC00,PARM='DLI,cobol pgm,PSB name','TRAN'


I tried googling and can't find the exact position to put it in JCL.

Thanks
Vinu
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jun 29, 2010 8:53 pm    Post subject:
Reply with quote

Hello,

Did you read the referenced material from the manual (rather than chasing thru Google)?

Did you look within this forum? This topic was posted previously:
Quote:
How can I pass parms from JCL to an IMS batch program?
http://www.ibmmainframes.com/post-117396.html
Back to top
View user's profile Send private message
vinu78

Active User


Joined: 02 Oct 2008
Posts: 129
Location: India

PostPosted: Wed Jun 30, 2010 12:54 am    Post subject:
Reply with quote

Hi D Sh,

Thanks for the pointer.
I saw that topic in this forum yesterday however didn't get any clear idea about APARM. I will try the APARM else go with the SYSIN logic mentioned by you.

Thanks
Vinu
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jun 30, 2010 2:01 am    Post subject: Reply to: JCL - COBOL IMS - Parm issue
Reply with quote

Good luck - one way or another it will soon work icon_smile.gif

d
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 -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts DFHRESPONSE returns issue divated CICS 3 Wed Nov 02, 2016 6:32 pm
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am


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