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

JCL - COBOL IMS - Parm issue


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vinu78

Active User


Joined: 02 Oct 2008
Posts: 179
Location: India

PostPosted: Fri Jun 25, 2010 10:05 pm
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: 179
Location: India

PostPosted: Tue Jun 29, 2010 12:18 am
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

Moderator Emeritus


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

PostPosted: Tue Jun 29, 2010 12:37 am
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: 2146
Location: At my coffee table

PostPosted: Tue Jun 29, 2010 12:38 am
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

Moderator Emeritus


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

PostPosted: Tue Jun 29, 2010 12:45 am
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: 2146
Location: At my coffee table

PostPosted: Tue Jun 29, 2010 1:36 am
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

Moderator Emeritus


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

PostPosted: Tue Jun 29, 2010 2:20 am
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: 179
Location: India

PostPosted: Tue Jun 29, 2010 2:58 am
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: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Jun 29, 2010 12:20 pm
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: 179
Location: India

PostPosted: Tue Jun 29, 2010 8:21 pm
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

Moderator Emeritus


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

PostPosted: Tue Jun 29, 2010 8:53 pm
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?
www.ibmmainframes.com/post-117396.html
Back to top
View user's profile Send private message
vinu78

Active User


Joined: 02 Oct 2008
Posts: 179
Location: India

PostPosted: Wed Jun 30, 2010 12:54 am
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

Moderator Emeritus


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

PostPosted: Wed Jun 30, 2010 2:01 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts COBOL sorting, with input GDG base COBOL Programming 7
No new posts Need help with ADABAS query (COBOL-AD... All Other Mainframe Topics 0
No new posts XML Generate issue COBOL Programming 0
No new posts How to Login in to cics region and is... CICS 9
No new posts Replacing FILLER with FILLER<SeqNu... DFSORT/ICETOOL 2
Search our Forums:

Back to Top