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
 

 

Dynamic NDM Card

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

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Tue Mar 03, 2009 2:23 pm    Post subject: Dynamic NDM Card
Reply with quote

I have the following NDM card:

SIGNON USERID=(USERID,PASSWORD)
SUBMIT PROC=STARDEVA SNODE=SENNODE1
CASE=YES
&IDSN1='TEST.DB.EXTRACT.D&INDATE' -
&ODSN1='test_db_extract_dyyyymmdd.txt'
SIGNOFF

Daily basis, I am supposed to send the file via NDM. The file contains the date as the last qualifier.

Can anyone provide me the script for this?
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: Tue Mar 03, 2009 8:14 pm    Post subject: Reply to: Dynamic NDM Card
Reply with quote

As I've stated before, the Connect:Direct Process language has built-in variables that are useful for creating dynamic processes.

You need to direct your attention to the Process, not to the job:

Code:

//STEPXXXX EXEC PGM=DMBATCH,PARM='YYSLYNN'
...
//SYSIN DD *
 SIGNON USERID=(USERID,PASSWORD)
   SUBMIT PROC=STARDEVA SNODE=SENNODE1 -
     CASE=YES -
     &IDSN1='TEST.DB.EXTRACT.D&INDATE' -
     &ODSN1=test_db_extract_
 SIGNOFF                                 
/*                                       


Code:

STARDEVA PROCESS  PNODE=pnode -
                  &DATE=%SUBDATE1 -                               
                  &D1=d -                                         
                  &VAR1=&D1.&DATE -                               
                  &IDSN1=, -                                       
                  &ODSN1=                                         
*                                                                 
             SYMBOL &FILE=&ODSN1.&VAR1..txt                       
*                                                                 
STEP1     COPY    FROM (PNODE DSN=&IDSN1                         -
                        DISP=SHR)                                -
                  TO   (SNODE DSN=&FILE                          -
                        DISP=(RPL,CATLG,CATLG))                   
*                                                                 


These symbolics, like %SUBDATE1, are described in the "Understanding Connect:Direct Processes" Guide in the chapter that deals with Symbolic Substitution.
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Tue Mar 03, 2009 9:29 pm    Post subject:
Reply with quote

Superk,

Thanks for your reply.

Can you please provide me the link for the manual.
I searched on google and even in www.stercomm.com, But could not found any.

Please help me!
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: Tue Mar 03, 2009 9:37 pm    Post subject: Reply to: Dynamic NDM Card
Reply with quote

I ended up here for the "Understanding Connect:Direct Processes" Guide.

I ended up here for the Connect:Direct for z/OS v4.7 Documentation Set.
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Wed Mar 04, 2009 6:40 pm    Post subject:
Reply with quote

Superk,

thanks for the links.

To send the fies from Maifnrame to UNIX server, do we need any prior setup with the Sending node parameters linke below:

*****************
Node Name : comflon-prod
DNS Name : cjuynupr.abc.portal.net
CD port :1364
IP : 202.168.218.40
user id: comfgb
*****************

How to find these basic details fo Mainframe LPAR tat we are using and at the same Is there anything else to be done to make the NDM success for the first time.
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Wed Mar 04, 2009 6:50 pm    Post subject:
Reply with quote

Superk,

I was asked these details by destination UNIX server team member.
but, He is not in a psition to guide me the way to find these details.
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Wed Mar 04, 2009 8:40 pm    Post subject:
Reply with quote

Superk,

The above script is not handling the field,

&IDSN1='TEST.DB.EXTRACT.D&INDATE'

where INDATE = mmddyy which is passed with the job-step.
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: Wed Mar 04, 2009 8:56 pm    Post subject: Reply to: Dynamic NDM Card
Reply with quote

You know, I saw that entry where you had the D&INDATE value coded, and was wondering what exactly it represented. I was presuming that it was most likely something that your job scheduling system would resolve into some actual date value. It now seems as if you thought that somehow the DMBATCH utility would know how to translate that variable value into an actual date value. It doesn't. You need to pass it a real dataset name, not something with an unknown variable value attached.
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Wed Mar 04, 2009 11:07 pm    Post subject:
Reply with quote

But Superk,

My dataset looks like 'TEST.DB.EXTRACT.D&INDATE'

In the job-step I used to give

//step1 exec proc-name,indate=030409

In this can't we edit with some symbolic variables?
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: Thu Mar 05, 2009 12:17 am    Post subject: Reply to: Dynamic NDM Card
Reply with quote

This is geting a bit off-topic, but JCL variables are only known to the JCL and can only be used in a JCL construct. You have two options:

//STEPNAME EXEC PGM=XXXX,PARM='TEST.DB.EXTRACT.D&INDATE'

<< or >>

//DDNAME DD DSN=TEST.DB.EXTRACT.D&INDATE,DISP=SHR

Both of these will resolve properly at runtime. If it was me, I'd use the dataset in a DD statement, since you can refer to an external DD from your process code.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 05, 2009 12:20 am    Post subject:
Reply with quote

Hello,

Quote:
In this can't we edit with some symbolic variables?
Not in data - the ndm control cards are merely data to that program.

If you use a dd/dsn, then the substitution can work.
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Thu Mar 05, 2009 9:55 pm    Post subject:
Reply with quote

dick,

I used the dataset in the job as well as in the NDM card. Please correct me If I'm wrong.

Code:

//JOBNAME JOB (ACCNTNG),PROGRAMMER,TIME=2,CLASS=A,
// MSGCLASS=A,indate=mmddyy
//DMBATCH EXEC PGM=DMBATCH,REGION=1024K,PARM=’YYSLYNN’
//STEPLIB DD DISP=SHR,DSN=$CD.LINKLIB
//DMNETMAP DD DISP=SHR,DSN=$CD.NETMAP
//DMPUBLIB DD DISP=SHR,DSN=$CD.PROCESS
//DMMSGFIL DD DISP=SHR,DSN=$CD.MSG
//DDNAME DD DSN=TEST.DB.EXTRACT.D&INDATE,DISP=SHR
//DMPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
SIGNON USERID=(USERID,PASSWORD)
   SUBMIT PROC=STARDEVA SNODE=SENNODE1 -
     CASE=YES -
     &IDSN1="DDNAME" -
     &ODSN1=test_db_extract_
 SIGNOFF
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 05, 2009 11:08 pm    Post subject:
Reply with quote

Hello,

Personally, i'd use a different ddname for DDNAME icon_smile.gif

Did it run successfully?
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Fri Mar 06, 2009 9:28 pm    Post subject:
Reply with quote

Dick,

Another basic question related to the above.

We are about to NDM the file from Mainframe to UNIX server for the first time. For this to happen,

We need to make the setup at the destination server, which includes
a) Need to update with NDM.NETMAP the Mainframe IP, port, userid details
I don't understand about the IP and port details on mainframe

b) To create the USERID & PASSWORD
Who should actually responsible for creating the USRID?
Is it the UNIX server team or RACFID support team?

Please help me out in achieving these two steps.
NDM job is ready with all the information you have provided above, But this basic informatio is stopping me to proceed further.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Mar 06, 2009 10:27 pm    Post subject:
Reply with quote

Hello,

Quote:
I don't understand about the IP and port details on mainframe
Suggest you talk with your mainframe network support.

I suspect that the unix security admins would do the unix setup and the mainframe security admins would do the racf (if any was needed).
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Wed Mar 11, 2009 6:49 pm    Post subject:
Reply with quote

Hi Superk / Dick

In the above script
STARDEVA PROCESS PNODE=pnode -
&DATE=%SUBDATE1 -
&D1=d -
&VAR1=&D1.&DATE -
&IDSN1=, -
&ODSN1=
*
SYMBOL &FILE=&ODSN1.&VAR1..txt
*
STEP1 COPY FROM (PNODE DSN=&IDSN1 -
DISP=SHR) -
TO (SNODE DSN=&FILE -
DISP=(RPL,CATLG,CATLG))
*

What is SNODE & PNODE?

I understand that SNODE is must in the SIGNON SUBMIT statement as below.
Then what about the above process statement. Please suggest.

SIGNON USERID=(USERID,PASSWORD)
SUBMIT PROC=STARDEVA SNODE=mfnode -
CASE=YES -
&IDSN1="DDNAME" -
&ODSN1=test_db_extract_
SIGNOFF
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Wed Mar 11, 2009 10:56 pm    Post subject:
Reply with quote

I gave it like this:

SIGNON USERID=(USERID,PASSWORD)
SUBMIT PROC=STARDEVA SNODE=unixnode -
CASE=YES -
&IDSN1='mftest.process.file' -
&ODSN1=test_db_extract_d090311
SIGNOFF

and then

STARDEVA PROCESS PNODE=mfnode SNODE=unixnode -
*
STEP1 COPY FROM (PNODE DSN=&IDSN1 -
DISP=SHR) -
TO (SNODE DSN=&FILE -
DISP=(RPL,CATLG,CATLG))
*

But the UNIX team can't see the file on their servers.

Please suggest the what is wrong here!
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7914
Location: Bellevue, IA

PostPosted: Thu Mar 12, 2009 12:34 am    Post subject:
Reply with quote

Quote:
&ODSN1=test_db_extract_d090311
seems to conflict with
Quote:
TO (SNODE DSN=&FILE -
DISP=(RPL,CATLG,CATLG))
but since I've never done anything with Connect Direct I'm not the person to say for sure.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 12, 2009 1:28 am    Post subject:
Reply with quote

Hello,

Quote:
but since I've never done anything with Connect Direct I'm not the person to say for sure.
I resemble that as well. . .

However, the session should have produced some informational messages. What do they say?

Quote:
But the UNIX team can't see the file on their servers.
Possibly the file is not in the directory where they are looking. Suggest you run a test with a very non-standard file name (that is guaranteed to be unique) and if the transfer says it is successful, search the entire target unix file system. If the created file somehow had a period for the first position of the file name, it may be "hidden".
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
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
This topic is locked: you cannot edit posts or make replies. Sort card to replace text using cross... Susanta SYNCSORT 32 Tue Sep 13, 2016 4:17 pm
No new posts Creating a dynamic sort card in JCL u... ChitraChhabra DFSORT/ICETOOL 4 Wed Aug 03, 2016 6:15 pm
No new posts Need help on SQL Dynamic WHERE Clause subratarec DB2 12 Sat Jul 16, 2016 3:11 pm
No new posts Need to create file with Dynamic Name... kapil27 JCL & VSAM 4 Wed May 25, 2016 9:45 am


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