MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

NDM Through JCL - Passing Parameters to NDM PROC?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
Bharath.AK
Beginner


Joined: 13 Jul 2007
Posts: 34
Topics: 10
Location: Los Angeles

PostPosted: Fri May 01, 2009 7:53 pm    Post subject: NDM Through JCL - Passing Parameters to NDM PROC? Reply with quote

Hi,

I need to NDM files (some hundreds) from a batch job (not from the Panel). To reduce the effort, I decided to pass parameters from JCL to NDM Proc each time I run the batch job.

But I found out that I can not pass the parameters to Proc dynamically (or I am not doing it right).

In JCL,

Code:
SET REG='NC'
SET ID='T'
SET NUID='F7777'


In NDM Proc,

Code:
DS1 = '&NUID..&REG..TEST&ID..SASDATA',
DS2 = 'ALLS.&REG..TEST&ID..SAS',
.....
....
...


When I do the JCL PREP, it says REG, ID & NUID are never used and he file names are not being recognized either as the parameters are not being resolved in the Proc.

Please let me know how can I handle this, else I have to have so many JCLs for each file.

Thanks a lot,

Cheers,
BK
_________________
Regards,
BK

***** " If You Have To Do It, You Might As Well Do It Right.....If It Is Worth Doing At All, It's Worth Doing It Right !!! " *****
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Sat May 02, 2009 8:34 am    Post subject: Reply with quote

You are confusing your data with JCL. Symbolic parameters (the &... stuff) is JCL. The JCL converter only converts JCL not your data.

You can have a symbolic parmeter to a program (PARM=&MYPARM) which could generate your NDM control data.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Bharath.AK
Beginner


Joined: 13 Jul 2007
Posts: 34
Topics: 10
Location: Los Angeles

PostPosted: Sat May 02, 2009 10:40 am    Post subject: Reply with quote

Hi,

My bad. I wasn't clear on my question. Actually

In JCL, it is

SET REG='NC'
SET ID='T'
SET NUID='F7777'


In NDM Step (but no Proc),

DS1 = '&NUID..&REG..TEST&ID..SASDATA',
DS2 = 'ALLS.&REG..TEST&ID..SAS',
.....
....
...

I'm not doing anything in the Proc. Still it is not resolving the parameters. Is it due to they are being given in single quotes or something like that?

Please advise.
_________________
Regards,
BK

***** " If You Have To Do It, You Might As Well Do It Right.....If It Is Worth Doing At All, It's Worth Doing It Right !!! " *****
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sat May 02, 2009 2:29 pm    Post subject: Reply with quote

Bharath.AK,


You need to define the symbols in the process statements and pass the symbols using parm. Look at the User guide for examples

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Sat May 02, 2009 5:44 pm    Post subject: Reply with quote

BK, I don't think you're heeding Nic's advice.

You can do this:

Code:

//JOBNAME JOB .......
//*
// SET REG='NC'
// SET ID='T'
// SET NUID='F7777'
//*
//STEP01   EXEC PGM=DMBATCH,PARM=(YYSLYNN)
//DMNETMAP DD  DSN=NDM.NETMAP,DISP=SHR                         
//DMPUBLIB DD  DSN=NDM.PROCESS.LIB,DISP=SHR
//DMMSGFIL DD  DSN=NDM.MSG,DISP=SHR                             
//DMPRINT  DD  SYSOUT=*
//DS1 DD DSN=&NUID..&REG..TEST&ID..SASDATA,DISP=SHR
//DS2 DD DSN=ALLS.&REG..TEST&ID..SAS,DISP=SHR
//SYSIN    DD  *                                                     
  SIGNON ESF=YES
  SUBMIT PROC=PROCESS MAXDELAY=UNLIMITED
  SIGNOFF                                                           
/* 


As long as both of the datasets for DS1 and DS2 are cataloged when the DMBATCH step runs, everything should work OK. Of course, if both datasets were cataloged and existed on the same system, then it wouldn't make much sense to be using Connect:Direct in the first place.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Sun May 03, 2009 9:18 am    Post subject: Reply with quote

BK

SET still only affects JCL statements - not the data within a jobstream. (JCL statements are those beginning //, /* and //*. Even then it will not affect JCL statements that are data i.e. come after a //... DD * and before the matching /*, or otherwise defined, delimiter.)
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Mon May 04, 2009 1:51 pm    Post subject: Reply with quote

BK,

You would need an additional step, may be a REXX routine, before DMBATCH that will convert your symbolics to actual value.

Diba.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group