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

Difference b/w passing parm from jcl to cobol and cobol-db2


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
saurabh7878
Warnings : 1

New User


Joined: 02 Jun 2005
Posts: 16

PostPosted: Thu Jul 14, 2005 1:11 pm
Reply with quote

Hi all
Is there a difference in passing the parameters from JCL to a cobol program and a cobol-db2 program..........

I know we can pass parameter to a cobol program specifying
PARM ='VALUES' in the JCL...
But not sure about cobol-db2 program

Thanks in advance
Back to top
View user's profile Send private message
somasundaran_k

Active User


Joined: 03 Jun 2003
Posts: 134

PostPosted: Thu Jul 14, 2005 7:42 pm
Reply with quote

Put your PARM in the SYSTSIN card. Something like

Code:

//SYSTSIN  DD  *
   DSN SYSTEM(your db2 sys)                           
   RUN  PROGRAM(your COBOL-DB2 program) PLAN(Plan name) -   
        LIB('Load library') PARM('values')
/*


And access it in your linkage section.

hth
-Som
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Wed Jun 07, 2006 5:27 pm
Reply with quote

Hi ,

I want to keep parm in jcl as variable .

if i keep it in systin inside pds-member then it can't be a variable .

is there any other way to pass parm from jcl (its a cobol-db2 prog.) .

Thanks ,
-Kapil.
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Wed Jun 07, 2006 7:30 pm
Reply with quote

supply a parm card instead of hard coding the SYSTSIN details as below:
//SYSTSIN DD DSN=&SUPPLY YOURPARMLIB HERE(MEM)


YOURPARMLIB HERE(MEM) will contain the following details

DSN SYSTEM(DAD0)
RUN PROGRAM(PGM) -
PLAN(PGM) -
PARM(' 2006-02-03')
END
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Wed Jun 07, 2006 11:07 pm
Reply with quote

tat is exactly wat i m saying .

i dont want to pass parm from inside a member .
because i hav to change parm again n again .
i want to control parm from jcl itself .

i hope i am clear now .
1 more thing i can't use 'accept' verb .

Thanks ,
-Kapil.
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Thu Jun 08, 2006 11:08 am
Reply with quote

You have to use REXX to do that if your client has any REXX utilities you may go for them
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top