IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Usage of SYMNAMES


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Wed Jan 13, 2010 11:25 pm
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:

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
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

Moderator Emeritus


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

PostPosted: Thu Jan 14, 2010 12:45 am
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
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 Developer


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

PostPosted: Fri Jan 15, 2010 2:26 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts STEM usage in REXX CLIST & REXX 14
No new posts z/OS Modules Usage report using SMF 42 DFSORT/ICETOOL 2
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts JCL and TAPE drives: how to maximize ... JCL & VSAM 9
No new posts Usage of BINSEARCH PL/I PL/I & Assembler 1
Search our Forums:

Back to Top