Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
cobol db2 progarm passing parm parameter

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
mahi

New User


Joined: 04 Apr 2006
Posts: 86
Location: Pune

PostPosted: Wed Aug 06, 2008 3:30 pm    Post subject: cobol db2 progarm passing parm parameter
Reply with quote

Code:

//A12345  EXEC  PGM=IKJEFT1A,                       
//            DYNAMNBR=30,                           
//STEPLIB  DD DSN=DB2B.REF.LDCLOAD,                 
//            DISP=SHR                               
//         DD DSN=DB26.REF.LDCEXIT,                 
//            DISP=SHR                               
//         DD DSN=SYS2.LDCS.PRODLOAD,                 
//            DISP=SHR                               
//SYSTSPRT DD SYSOUT=*                               
//SYSTSIN  DD DSN=SYS2.OPER.PARMLIB(A12345P),       
//            DISP=SHR     
//PRODPARM DD DSN=SYS2.OPER.PARMLIB(A12345S),
//            DISP=SHR                         
//DISK     DD DSN=P.A12345.LDCS01.C&DATE01.01,   
//            DISP=SHR                               
//SYSOUT   DD SYSOUT=* 


Here I'm executing the cobol-db2 program which is in parm parameter a12345p.

From PRODPARM I am supplying some data to the cobol-db2 progarm. So how can I capture the PRODPARM values in the cobol-db2 program. I need to have this variables in an internal cobol table.
Structure of A12345S:
LDC ID 4 byttes
LDC OPT CLSS 2
OPT ID 4
eX: LDC1 NA 0000
LDC2 NA 9999
LDC3 EX 0000
Back to top
View user's profile Send private message

rpuhlman

New User


Joined: 11 Jun 2007
Posts: 80
Location: Columbus, Ohio

PostPosted: Wed Aug 06, 2008 7:18 pm    Post subject:
Reply with quote

Mahi,

You would treat PRODPARM as any other input file in your program. Assuming (yuk) PRODPARM is the name of the file in your SELECT statement in FILE-CONTROL you would OPEN INPUT PRODPARM , READ PRODPARM, Move your variables, CLOSE PRODPARM ... Simplistic example, but you should get the idea.

Rick
Back to top
View user's profile Send private message
mahi

New User


Joined: 04 Apr 2006
Posts: 86
Location: Pune

PostPosted: Wed Aug 06, 2008 8:15 pm    Post subject:
Reply with quote

Thanx rick..
Can we open the PRODPARM as any other file??IF that is the case my problem will be solved...
Am asking again just for confirmation...
Back to top
View user's profile Send private message
rpuhlman

New User


Joined: 11 Jun 2007
Posts: 80
Location: Columbus, Ohio

PostPosted: Wed Aug 06, 2008 9:37 pm    Post subject:
Reply with quote

Hi Mahi,

Yes.

Rick
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DUMMY When do I need add a DCB parameter Martylin JCL & VSAM 3 Fri Dec 08, 2017 7:20 am
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts COBOL - EXIT statement weird behavior anthony.pangestu COBOL Programming 0 Fri Oct 27, 2017 9:57 am
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us