Re: System symbols in batch jobs

2011-02-24 Thread Walter Marguccio
 I thought I'd share it for those interested parties who have NetView.


I use more or less the same principle to accomplish the same goal. I wrote a 
simple REXX
which NetView kicks off every night at 00:00, writing a member named VARS into 
one of 

the JES-knownlibrary named SYS1.SYSNAME.PROCLIB:

//* -- Variables set on 24 Feb 2011
//   SET SYSNAME=PROD  
//   SET ID=PR 
//   SET IPLVOL=Z19R1B 
//*
//   SET DD=24 
//   SET MM=02 
//   SET YY=11 
//   SET DAY=THU   
//   SET MONTH=FEB 
//   SET YEAR=2011 
//*
//   SET DOW=4  Day Of Week
//   SET JD=11055   Julian Date
//   SET PFX=J   Dataset prefix
//* --- at 00:00:00

The REXX makes available both static and dynamic system symbols. Whoever wants 
to exploit them, 

must add the INCLUDE stmt in their JCL, as Alan mentioned.

 It's not pretty but it can be helpful to circumvent that annoying restriction.

Maybe is not pretty, but it is effective. Unfortunately it doesn't solve the 
problem with variables not 

recognized in SYSIN-type input datasets. For such cases, I use PGM=EZACFSM1.



Walter Marguccio
z/OS Systems Programmer
BELENUS LOB Informatic GmbH
Munich - Germany




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


System symbols in batch jobs

2011-02-23 Thread Starr, Alan
Hello List,

This post is related to the existing discussion but does not address the C 
fopen() issue.

I have, on occasion, needed a static system symbol in batch JCL that could not 
be easily incorporated into a symbolicrelate alias. To that end, I wrote a 
small NetView REXX that is executed shortly after IPL and after IEASYMUP is 
used to modify a static system symbol. I thought I'd share it for those 
interested parties who have NetView.


/* Always practice safe REXX*/ 
// 
/*  */ 
/* * Description *  */ 
/*  */ 
/* Create a member of SYS2.PROCLIB that sets JCL symbols to the */ 
/* value of their corresponding MVS static system symbol. It may*/ 
/* be INCLUDEd into batch jobs, allowing them access to the MVS */ 
/* symbol definitions:  */ 
/*  */ 
/* //  INCLUDE MEMBER=MVSVARS   */ 
/*  */ 
/*--*/ 
/*  */ 
/* Activity log:*/ 
/*  */ 
/* 08/11/08 ALS Initial incarnation */ 
/*  */ 
// 
   
  Parse Source where what myname ddname junk   
  my_rc = 0
   
  cc1 = '//'copies('*',68) 
  cc2 = '//*   'date('U')'  'time('N') 
  cc3 = '//*'  
  cc4 = '//* The following set statements define JCL symbolics which'  
  cc5 = '//* correspond to the values of all MVS static system symbols'
  cc6 = '//*'  
  cc7 = '//'copies('*',68) 
   
  Pipe (Name getvars End ¬)  ,
  | MVS D SYMBOLS  ,
  | CORRWAIT  10  , 
  | SEPARATE   ,
  | DROP FIRST 1 LINES  ,   
  | CHANGE / //  ,  
  | CHANGE //'/  ,
  | CHANGE ''//  SET '  ,  
  | CHANGE /.//  ,  
  | LITERAL 'cc7'  ,  
  | LITERAL 'cc6'  ,  
  | LITERAL 'cc5'  ,  
  | LITERAL 'cc4'  ,  
  | LITERAL 'cc3'  ,  
  | LITERAL 'cc2'  ,  
  | LITERAL 'cc1'  ,  
  | QSAM (DSN) SYS2.PROCLIB(MVSVARS)


Member MVSVARS in SYS2.PROCLIB (which is in the standard JES concatenation) 
looks like this:

// 
//*   09/05/10  21:57:51   
//*
//* THE FOLLOWING SET STATEMENTS DEFINE JCL SYMBOLICS WHICH
//* CORRESPOND TO THE VALUES OF ALL MVS STATIC SYSTEM SYMBOLS  
//*
// 
//  SET SYSALVL='2'
//  SET SYSCLONE='Y1'  
//  SET SYSNAME='SY1'  
//  SET SYSPLEX='WAWPLEX'  
//  SET SYSR1='RES2E1' 
//  SET CNMDOMN='CNM10'
//  SET CNMHLQ#='3'
//  SET CNMNETID='PERS'
//  SET CNMRODM='EKGRODM'  
//  SET CNMSA='10' 
//  SET CNMTCPN='TCPIP'
//  SET DASDSTAT='LIST'
//  SET ID='2' 
//  SET LPAR='PA2' 
//  SET MODOCE1='FSS666A'