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
 
Passing Parms to a control card

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
CJT

New User


Joined: 02 Aug 2007
Posts: 83
Location: Here

PostPosted: Tue Jan 08, 2008 12:16 pm    Post subject: Passing Parms to a control card
Reply with quote

Hi,

I have a Cobol-DB2 program which needs the User ID. but since i am using a control Card for the program, i will have to pass USER ID to the control card.

Does anyone know how the user ID can be passed to the control card.

I know that in a simple cobol program specifying

STEP01 EXEC PGM=TEST,PARM='&SYSUID'

would pass the SYSUID in the program.
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Jan 08, 2008 12:41 pm    Post subject:
Reply with quote

There is no way to imbed symbolic parameters in input cards.

You can, however, add a step and generate the input card on the fly.

O.
Back to top
View user's profile Send private message
CJT

New User


Joined: 02 Aug 2007
Posts: 83
Location: Here

PostPosted: Tue Jan 08, 2008 2:38 pm    Post subject: Reply to: Passing Parms to a control card
Reply with quote

Hi Ofer,

I did not quite catch you. Can you explain a little more?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Jan 08, 2008 2:45 pm    Post subject:
Reply with quote

Instead of hardcoding your input card in the JCL code, use a dataset. For example, instead
Code:
//INPCARD DD *
This is my input data
/*


Use
Code:
//INPCARD DD DSN=&&TEMPDS,DISP=(OLD,DELETE,DELETE)
.

Generate this dataset just before you execute your COBOL program.

O.
Back to top
View user's profile Send private message
CJT

New User


Joined: 02 Aug 2007
Posts: 83
Location: Here

PostPosted: Tue Jan 08, 2008 3:01 pm    Post subject: Reply to: Passing Parms to a control card
Reply with quote

But How will i be able to pass the User ID to this temp dataset?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Jan 08, 2008 3:09 pm    Post subject:
Reply with quote

in the PARM, or using MVS data areas.

O.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1252
Location: Israel

PostPosted: Tue Jan 08, 2008 9:22 pm    Post subject:
Reply with quote

As you are in a COBOL/DB2 program, you can try:
Code:
EXEC SQL SET             
    :UserNameArea = USER   
END-EXEC

Of course, it is of no use if you need the userid to connect to DB2, but if you don't that will be the easiest way.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Control-M restart instruction sonaliingle CA Products 2 Tue Nov 28, 2017 5:05 pm
This topic is locked: you cannot edit posts or make replies. Need help how to pass the ESP variabl... Venkichaitu JCL & VSAM 12 Thu Nov 02, 2017 3:53 am
No new posts Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 5 Sat Aug 19, 2017 2:33 pm
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts PA02 - Programmtically control attent... dodithegreat IMS DB/DC 1 Thu Apr 06, 2017 8:33 pm

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