Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Overriding DSN1 and DSN2 names in DMBATCH job

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
vishalbshah

New User


Joined: 01 Dec 2006
Posts: 61
Location: Pune

PostPosted: Fri Sep 23, 2011 5:27 pm    Post subject: Overriding DSN1 and DSN2 names in DMBATCH job
Reply with quote

Hi,

I am using Connect direct job to transfer my file to another LPAR, I want to use symbolic parameter for my DSN1 and DSN2 so that i can change them as and when required.

below is my job

Code:
//UUS050   EXEC PGM=DMBATCH               
//DMNETMAP  DD DSN=LNDM.SECPLUS.NETMAP,DISP=SHR           
//DMPUBLIB  DD DSN=&PROCLIB,DISP=SHR                     
//DMMSGFIL  DD DSN=LNDM.MASK,DISP=SHR                     
//SYSUDUMP  DD SYSOUT=&SOUT3                             
//DMPRINT   DD SYSOUT=&SAUTE                             
//NDMCMDS   DD SYSOUT=&SOUTA                             
//DDUCDI    DD DSN=&HLQ..&QUAL1..&QUAL2..&QUAL3.,DISP=MOD       
//DDUCDO    DD DSN=&HLQ..&QUAL1..&QUAL2..&QUAL3.,DISP=MOD   
//SYSIN     DD *                   
 SIGNON                                   
 SUBMIT PROC=COPYFILE -                   
 &NODE=OATBS -                           
 &SNIDE=OATBS -                           
 SNOODED=(TCSPP4,sai#299) -               
 &DSN1= DDUCDI-                       
 &DSN2= DDUCDO -                       
 &DISP1='SHR' -                           
 &DISP2='CATLG'                           
 SIGNOFF                                 
/*
//

--------------------------------------------------------------------
COPYFILE PROC has

Code:
COPYFILE PROCESS SNIDE=&SNIDE NODE=&NODE           
STEP1   COPY FROM(NODE DSN=&DSN1              -     
                  DISP=SHR)                     -     
             TO(SNIDE DSN=&DSN2                 -     
                DISP=REPEL)                 -           
             COMPRESS                                 
         IF (STEP1>0) THEN                           
STEP2    RUN TASK(PGM=MDNOTIFY)PNODE                 
         EF   


----------------------------------------------------------------------

As per manual &DSN1 and &DSN2 should be the file name as I want to use symbolic parameters I used DD names but the same is not working...
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7255

PostPosted: Fri Sep 23, 2011 6:17 pm    Post subject: Re: Overriding DSN1 and DSN2 names in DMBATCH job
Reply with quote

If you describe how you intend to use this whole process, you'll probably get some suggestions.
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Fri Sep 23, 2011 6:23 pm    Post subject: Reply to: Overriding DSN1 and DSN2 names in DMBATCH job
Reply with quote

The FROM parameter of the process can point to a DDNAME allocated to the calling JCL, which you can use any type of normal JCL variable substitution with. Obviously, the TO can't since it's not going to be on the same system, so that value does have to be supplied to the process.

I think your best option will be to use a program (DFSORT, REXX, CLIST, SAS, etc.) prior to DMBATCH that will accept the FROM and TO dataset names as parameters and then will generate the proper DMBATCH input stream with any JCL variables properly resolved.
Back to top
View user's profile Send private message
vishalbshah

New User


Joined: 01 Dec 2006
Posts: 61
Location: Pune

PostPosted: Fri Sep 23, 2011 6:25 pm    Post subject: Reply to: Overriding DSN1 and DSN2 names in DMBATCH job
Reply with quote

Thanks for reply!

I want to modify a file name DSN1 and DSN2 for every execution.

but as you mentioned we can't override data inside SYSIN DD *

I have no other go then hardcoding the dataset names inside SYSIN DD* for DSN1 and DSN2.

Thanks Again!
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Sep 23, 2011 6:36 pm    Post subject:
Reply with quote

no you do have other options.

if you were not using instream data for the sysin and instead use a DSN,
you could piece the sysin into 3 or 4 concatenated members,
1st would contain:
Code:
SIGNON                                   
 SUBMIT PROC=COPYFILE -                   
 &NODE=OATBS -                           
 &SNIDE=OATBS -                           
 SNOODED=(TCSPP4,sai#299) -     

2nd would contain:
Code:
 &DSN1= DDUCDI-

3rd would contain:
Code:
&DSN2= DDUCDO -

4th would contain:
Code:
 &DISP1='SHR' -                           
 &DISP2='CATLG'                           
 SIGNOFF

but you could have the 3rd and 4th as one.

a little imagination helps,
but can not be employed when everything has to just be this way

and before anything is said, remember, these members (2nd and 3rd) could be populated at run-time.
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Variable for cursor names ravikumar15 DB2 5 Sun Jul 17, 2016 7:08 am
No new posts Using Field names in FILEAID Batch CO... Atul Banke Compuware & Other Tools 2 Wed Jun 29, 2016 9:54 pm
No new posts JCL overriding concept s.saranya srinivasan JCL & VSAM 14 Wed Oct 07, 2015 4:07 pm
No new posts Utility to List PDS member names with... GaganGarg CLIST & REXX 6 Fri Jun 12, 2015 12:25 pm
No new posts Using Wildcard for PDS names with PDS... PokerGuru CA Products 1 Fri May 22, 2015 2:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us