> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[EMAIL PROTECTED] On Behalf Of Shmuel Metz (Seymour J.)
> Sent: Sunday, June 15, 2008 1:00 AM
> To: [email protected]
> Subject: Re: Enhanced JCL processor? (and maybe a few other thoughts)
> 
 
<snip>

> >6) A new parameter on the DD * and/or DD DATA, SYMBOLS=YES. 
> This tells
> >JES2 to examine the instream data, looking for symbols which can be
> >resolved, such as &SYSUID, &HOME, a static system symbol, or 
> any other
> >symbol set with the // SET statement, and replace the symbol with its
> >value. If there is no value for that symbol, leave the symbol alone.
> 
> Yes. This has also been discussed before.

<snip>

> > 
> >9) Similar to 6 above, but maybe somebody here would like to do it. A
> >subsystem which can be used on a DD statement to translate system
> >symbols to their value as lines are read from the file (be 
> it a dataset,
> >UNIX file, or instream).
> 
> There used to be a subsystem (GPSAM?) on the CBT that would be a good
> starting point, although it would be nice if IBM provide a standard
> subsystems for this.
> 

Another good starting point might be a program I recently posted to the
CBT as file 779.  It performs pretty much what is described above.  It
reads one or more input DD's, performs substitutions and writes the
files back out to paired output DD's.  The values for the symbols are
retrieved from the JESJCL dataset via a call to SDSF, so there is no
need for passing them on parms or other manipulations.  If the symbols
are known in the JCL, this program can determine their value for the
step in which it executes.

This program does have one very limited situation in which it may not be
able to determine the correct value for a symbol, but it is coded to
detect if that happens and issues a bad return code and a detailed error
report.

Here is an example of how it might be used:
//***********************************************************
//  SET DB2SUBS=TSTDB2S                                      
//  SET DB2DBNM=TSTDBNM                                      
//  SET DB2CRE8=TSTOWNR                                      
//***********************************************************
//DOSYMBOL EXEC PGM=SYMBSUB                                  
//CNTL001I DD *                                              
  DSN SYSTEM(&DB2SUBS)   
 -TERM UTILITY(UNLMYTBL) 
  END                    
//CNTL001O DD DSN=&&TERMCARD,DISP=(NEW,PASS),                      
//            DCB=(LRECL=80,BLKSIZE=0,RECFM=FB),             
//            UNIT=VIO,SPACE=(TRK,(1,0))                
//CNTL002I DD *                                              
  UNLOAD TABLESPACE &DB2DBNM..MYTBLSPC                       
    LOCK NO   QUIESCE YES   QUIESCECAT NO                   
    SELECT * FROM &DB2CRE8..MY_DB2_TABLE                       
    FORMAT USER ()   OUTDDN(SYSREC00)                       
//CNTL002O DD DSN=&&UNLDCARD,DISP=(NEW,PASS),                      
//            DCB=(LRECL=80,BLKSIZE=0,RECFM=FB),             
//            UNIT=VIO,SPACE=(TRK,(1,0))                
//SYSOUT   DD SYSOUT=*                                       
//SYSPRINT DD SYSOUT=*                                       
//SYSUDUMP DD SYSOUT=*                                       
//***********************************************************

Bill Bass
United Health Care
Greenville, SC



This e-mail, including attachments, may include confidential and/or 
proprietary information, and may be used only by the person or entity to 
which it is addressed. If the reader of this e-mail is not the intended 
recipient or his or her authorized agent, the reader is hereby notified 
that any dissemination, distribution or copying of this e-mail is 
prohibited. If you have received this e-mail in error, please notify the 
sender by replying to this message and delete this e-mail immediately.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to