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
 

 

Usage of SYMNAMES

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
janusman

New User


Joined: 09 Sep 2008
Posts: 31
Location: India

PostPosted: Wed Jan 13, 2010 11:12 pm    Post subject: Usage of SYMNAMES
Reply with quote

Hi

I have a question. Can the symbols defined in SYMNAMES dataset be used to create a file name based on the value from SYMNAMES dataset?

e.g.

I have defined the below symbols.

Code:
REPORT-ID,*,12,CH           
SPACE1,*,1,CH               
JOBNAME,*,8,CH             
SPACE2,*,1,CH               
GEN,*,5,CH                 
SPACE3,*,1,CH               
SEQID,*,4,CH               
SPACE4,*,1,CH               
MM,*,2,CH                   
SLASH1,*,1,CH               
DD,*,2,CH                   
SLASH2,*,1,CH               
CRCEN,*,2,CH               
YY,*,2,CH           


Data in synnames dataset:

Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
JOB13245-R12 JOB12345 MMMMM NNNN 06/14/2006


I want to create a dataset with the a node containing MMDDYY from the above symname dataset (in this e.g. 061406).

The dataset name can be "A.B.DT061406". Please note that the third node is the date from symnames dataset.

Can the symnames symbol be used only in SORT CARDS??

Can you please guide me if there is any other means to achieve it?
TIA
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Jan 13, 2010 11:25 pm    Post subject:
Reply with quote

You can build that dsname from the symbols, but what do you want to do with it? If you want to use it in a JCL statement, you would have to generate the JCL and send it to the internal reader.

For an example of how to do this kind of thing, see the "Generate JCL to submit to the internal reader" Smart DFSORT Trick at:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000094
Back to top
View user's profile Send private message
janusman

New User


Joined: 09 Sep 2008
Posts: 31
Location: India

PostPosted: Wed Jan 13, 2010 11:29 pm    Post subject:
Reply with quote

Frank

Thanks. I had the same idea - but was wondering if there are any other ways.

Thanks. I will try this approach.
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 Jan 14, 2010 12:45 am    Post subject:
Reply with quote

Hello,

Quote:
but was wondering if there are any other ways
When JCL is created "on the fly" it is only data. To be a job, it must be presented to the system (i.e. Internal Reader).
Back to top
View user's profile Send private message
janusman

New User


Joined: 09 Sep 2008
Posts: 31
Location: India

PostPosted: Fri Jan 15, 2010 1:50 am    Post subject:
Reply with quote

Hi

I tried generating the JCL but, the symbols from the SORTIN file was not replaced. I am sure am doing something stupid.

Can someone pls help me out on where I have gone wrong?

I am trying to substitute the date from the input file which i have defined using symnames to the third node of the dataset (DTMMDDYY)

Code:
//STEP2  EXEC PGM=SORT                                                 
//SYSOUT    DD SYSOUT=*                                                 
//SYMNOUT DD SYSOUT=*                                                   
//SYMNAMES DD DSN=<symname dataset with symbol definitions>,DISP=SHR      => def given @ top of this post                 
//SORTIN DD DSN=<symname dataset with data>,DISP=SHR               => data given @ top of this post                   
//SORTOUT   DD SYSOUT=(*,INTRDR)                                       
//SYSIN     DD *                                                       
  OPTION COPY                                                           
  OUTFIL REMOVECC,NODETAIL,                                             
   HEADER1=('//XXXXXXX$ JOB (nnnnnT,xxxxxxxx),CLASS=A,MSGCLASS=X,',/,   
     '// NOTIFY=&SYSUID',/,                                             
     '//STEP6    EXEC PGM=SARBCH',/,                                   
     '//SYSPRINT DD SYSOUT=*',/,                                       
     '//LISTOUT1 DD DSN=A.B.DTMMDDYY,',/,         
     '//            DISP=(,CATLG,),UNIT=SYSALLDA,',/,                   
     '//            DCB=(LRECL=133,BLKSIZE=0,RECFM=FBA),',/,           
     '//            SPACE=(CYL,(2,1),RLSE)',/,                         
     '//SYSIN DD DSN=<control card for SARBCH>,DISP=SHR')           
/* 


Thanks.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Jan 15, 2010 2:26 am    Post subject:
Reply with quote

You seem to be kind of confused about which data set is what.

This is a record in an input data set (this is not a SYMNAMES data set):

Code:

JOB13245-R12 JOB12345 MMMMM NNNN 06/14/2006


This is a SYMNAMES data set that maps the input record:

Code:

REPORT-ID,*,12,CH           
SPACE1,*,1,CH               
JOBNAME,*,8,CH             
SPACE2,*,1,CH               
GEN,*,5,CH                 
SPACE3,*,1,CH               
SEQID,*,4,CH               
SPACE4,*,1,CH               
MM,*,2,CH                   
SLASH1,*,1,CH               
DD,*,2,CH                   
SLASH2,*,1,CH               
CRCEN,*,2,CH               
YY,*,2,CH         


You can use the symbols in the SYMNAMES data set to select fields from the input record for use in the output records. You would just use the appropriate symbols where you need them. Here's the correct DFSORT job (I've corrected your LISTOUT1 line as indicated):

Code:

//STEP2  EXEC PGM=SORT
//SYSOUT    DD SYSOUT=*
//SYMNOUT DD SYSOUT=*
//SYMNAMES DD DSN=<symname dataset with symbol definitions>,DISP=SHR
//SORTIN DD DSN=<input dataset with data>,DISP=SHR
//SORTOUT   DD SYSOUT=(*,INTRDR)
//SYSIN     DD *
  OPTION COPY
  OUTFIL REMOVECC,NODETAIL,
   HEADER1=('//XXXXXXX$ JOB (nnnnnT,xxxxxxxx),CLASS=A,MSGCLASS=X,',/,
     '// NOTIFY=&SYSUID',/,
     '//STEP6    EXEC PGM=SARBCH',/,
     '//SYSPRINT DD SYSOUT=*',/,
     '//LISTOUT1 DD DSN=A.B.DT',MM,DD,YY,',',/,  <-------
     '//            DISP=(,CATLG,),UNIT=SYSALLDA,',/,
     '//            DCB=(LRECL=133,BLKSIZE=0,RECFM=FBA),',/,
     '//            SPACE=(CYL,(2,1),RLSE)',/,
     '//SYSIN DD DSN=<control card for SARBCH>,DISP=SHR')
/*


The following would be submitted to the internal reader:

Code:

//XXXXXXX$ JOB (NNNNNT,XXXXXXXX),CLASS=A,MSGCLASS=X,         
// NOTIFY=&SYSUID                                           
//STEP6    EXEC PGM=SARBCH                                   
//SYSPRINT DD SYSOUT=*   
//LISTOUT1 DD DSN=A.B.DT061406,                                                   
//            DISP=(,CATLG,),UNIT=SYSALLDA,                 
//            DCB=(LRECL=133,BLKSIZE=0,RECFM=FBA),           
//            SPACE=(CYL,(2,1),RLSE)                         
//SYSIN DD DSN=<CONTROL CARD FOR SARBCH>,DISP=SHR           
Back to top
View user's profile Send private message
janusman

New User


Joined: 09 Sep 2008
Posts: 31
Location: India

PostPosted: Fri Jan 15, 2010 2:54 am    Post subject:
Reply with quote

Frank

I realized my stupidity. Thanks for the correction.

- Janusman
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts How to get previous month in SYMNAMES Suganya87 SYNCSORT 9 Fri Oct 28, 2016 1:37 pm
No new posts How can amount of the Storage Usage b... esduman61 CICS 6 Wed Mar 09, 2016 1:19 pm
No new posts Controlling usage of resources by tasks raja1128 CICS 3 Fri Nov 06, 2015 9:53 am
No new posts TDQ & its usage as ATI akodakka CICS 3 Sat Oct 17, 2015 6:04 pm


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