|
View previous topic :: View next topic
|
| Author |
Message |
vishalbshah
New User
Joined: 01 Dec 2006 Posts: 61 Location: Pune
|
|
|
|
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 |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
| If you describe how you intend to use this whole process, you'll probably get some suggestions. |
|
| Back to top |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
 |
vishalbshah
New User
Joined: 01 Dec 2006 Posts: 61 Location: Pune
|
|
|
|
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 |
|
 |
dbzTHEdinosauer
Global Moderator

Joined: 20 Oct 2006 Posts: 6965 Location: porcelain throne
|
|
|
|
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:
3rd would contain:
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 |
|
 |
|
|