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
 
Dynamic dd name

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

New User


Joined: 27 Oct 2005
Posts: 2

PostPosted: Sun Mar 19, 2006 4:16 am    Post subject: Dynamic dd name
Reply with quote

Hi,

I have a jcl whick looks like this :

//JS01 EXEC PGM=MYPROG
//INPUT DD DSN=TB@TEMP.TEST.FILE.T830,DISP=(new,catlg,delete),....
// DD DSN=TB@TEMP.TEST.FILE.T850.GEN(+1),DISP=SHR


I just would like to know which value will be replaced by '@' when jcl is run and where does this JCL take value for '@'
Back to top
View user's profile Send private message

martijn

New User


Joined: 09 Mar 2006
Posts: 14
Location: The Netherlands

PostPosted: Mon Mar 20, 2006 3:35 pm    Post subject:
Reply with quote

Hi Saket,

'@' does not indicate a variable, it a valid character! TB@TEMP will simply be TB@TEMP!!

N.B.: if is wasn't '@', but '&', it would indicate a variable!:-

- the variable would be &TEMP.
- How the system would resolve it, is impossible to say from the 3 lines of code you provided; it could be anything! Usually it's resolved by some code prior to the step using the variable (on the job-card, or by means of a SET-statement)....
- Note that when you use TB&TEMP.TEST, the '.' will be regarded as 'end of variable'-indicator, and will be removed when the variable is resolved. For instance; if &TEMP take the value 'SAMPLE', the result will be:
TBSAMPLETEST. if you want the result to be TBSAMPLE.TEST you would have to code TB&TEMP..TEST (two dots).

I hope you don't mind me going on about variables a bit, (as all you needed to know is that '@' is a valid character!..) it's one of my pet-subjects I'm afraid!
Back to top
View user's profile Send private message
Saket

New User


Joined: 27 Oct 2005
Posts: 2

PostPosted: Mon Mar 20, 2006 8:25 pm    Post subject: Dynamic dd name
Reply with quote

Hi Martin,

Thank you very much for your reply.

Can you please clarify one more doubt?

I have a skeleton jcl in which i have to create seperate output file by replacing few characters in DDname and dsn.

For example i have :

Comp num comp-name

230 W
239 V
240 G

In my program i process each company records by changing the control card. Depending on company, each output file has records for each company.

ex:

when i submit my control card for company -230

and my jcl has value

//comp@ dd dsn=ssxt.rti.comp@.data.

When i submit my jcl it should create DSN -

ssxt.rti.compW.data.W -

similarly,

ssxt.rti.compV.data.V - when i run with 239 comp
ssxt.rti.compG.data.G - when i run with 240 comp

So finally what i want to say is i have a generic or skeleton jcl which should create dynamic DSN for each company. I know it is possible. But can you please let me know how to do it?

Thank you and Regards,
Saket







martijn wrote:
Hi Saket,

'@' does not indicate a variable, it a valid character! TB@TEMP will simply be TB@TEMP!!

N.B.: if is wasn't '@', but '&', it would indicate a variable!:-

- the variable would be &TEMP.
- How the system would resolve it, is impossible to say from the 3 lines of code you provided; it could be anything! Usually it's resolved by some code prior to the step using the variable (on the job-card, or by means of a SET-statement)....
- Note that when you use TB&TEMP.TEST, the '.' will be regarded as 'end of variable'-indicator, and will be removed when the variable is resolved. For instance; if &TEMP take the value 'SAMPLE', the result will be:
TBSAMPLETEST. if you want the result to be TBSAMPLE.TEST you would have to code TB&TEMP..TEST (two dots).

I hope you don't mind me going on about variables a bit, (as all you needed to know is that '@' is a valid character!..) it's one of my pet-subjects I'm afraid!
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Mon Mar 20, 2006 8:30 pm    Post subject: Re: Dynamic dd name
Reply with quote

I think that the "at" sign (@) variable is probably a variable supplied by the job scheduling system.
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 REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Dynamic array request/response contai... Suja.Sai CICS 2 Tue Jan 24, 2017 11:37 am
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm

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