Discussion:
Help on complex variable
(too old to reply)
Noel Murphy
2017-05-15 14:06:51 UTC
Permalink
Raw Message
Hi all

I need help using Rexx to resolve only one Proc symbolic table entry that could be named UNIT01 UNIT02 or DEV01 etc.
The symbolic value is always = to CART and may have LABEL or VOL parms as part of the symbolic resolved value.
All I want to do is look at a Proc and if it has on the DD stmt a symbolic after the Key word UNIT=&UNIT01 or another name like &DEV01
READ that symbolic from the Proc Symbolic table above and just hardcode it in the DD stmt with no other changes
The proc could have just one DD using this symbolic or many. The rest of the DD if using symbolics for the Dataset name etc. I don't want to change. After all DD stmts that used the symbolic that had a value of CART are now hardcoded then just comment out the
Proc symbolic entry or just Delete it

The key is to look only for a symbolic that points to a value of CART not SYSDA or DISK
Also important is to capture any other sub-parms in the same complex symbolic if any and place all on the DD stmt in any order





//ABCD1234 PROC LIB01='ABC.PDS.CTRLCARD',
// DSNOUT='P',
// DSNIN='P',
// UNIT01='CART,VOL=(,,,99),LABEL=EXPDT=99000',
// JOBNAME='XYZZ1234',
// OCLSD='D',
// OCLSP='P'


//SORTIN DD DSN=&DSNIN.ABC.S.ABCD1234.ANCIENT.NONE,
// DISP=SHR,UNIT=SYSDA
// DD DSN=&DSNIN.ABC.S.ABCD1234.MASTER.REPORT,
// DISP=SHR,UNIT=SYSDA
//SORTOUT DD DSN=&DSNOUT.ABC.S.&JOBNAME..ARCHIVE.DETL(+1),
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT01,DATACLAS=COMPRESS,
// DCB=(DSORG=PS,RECFM=FB,LRECL=800,BLKSIZE=0)


For the above SORTOUT DD stmt I want
It to change from
// UNIT=&UNIT01,DATACLAS=COMPRESS,

TO
// UNIT=CART,VOL=(,,,99),LABEL=EXPDT=99000,DATACLAS=COMPRESS,
Or
// UNIT=CART,VOL=(,,,99),LABEL=EXPDT=99000,
// DATACLAS=COMPRESS,




In another Proc the symbolic is named UNIT02 and is defined in the Proc symbolic table as


// UNIT02='CART,VOL=(,,,99),LABEL=EXPDT=99000',


Proc DD stmts where the symbolic UNIT02 is referenced 13 times

// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,

2 of the DD stmts used are

//OUTRPT1 DD DSN=&DSNOUT.ABC.S.&JOBNAME..BKUP.FILE6,
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// DCB=(DSORG=PS,RECFM=FB,LRECL=320,BLKSIZE=0)
//OUTRPT2 DD DSN=&DSNOUT.ABC.S.&JOBNAME..RELOAD.FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// DCB=(DSORG=PS,RECFM=FB,LRECL=320,BLKSIZE=0)



Regards
Noel Murphy

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Mickey Bee
2017-05-15 15:49:21 UTC
Permalink
Raw Message
Personally, I would look at an edit macro for this.

-----Original Message-----
From: Noel Murphy
Sent: Monday, May 15, 2017 10:05 AM
To: TSO-***@VM.MARIST.EDU
Subject: [TSO-REXX] Help on complex variable


Hi all

I need help using Rexx to resolve only one Proc symbolic table entry that
could be named UNIT01 UNIT02 or DEV01 etc.
The symbolic value is always = to CART and may have LABEL or VOL parms as
part of the symbolic resolved value.
All I want to do is look at a Proc and if it has on the DD stmt a symbolic
after the Key word UNIT=&UNIT01 or another name like &DEV01
READ that symbolic from the Proc Symbolic table above and just hardcode it
in the DD stmt with no other changes
The proc could have just one DD using this symbolic or many. The rest of the
DD if using symbolics for the Dataset name etc. I don't want to change.
After all DD stmts that used the symbolic that had a value of CART are now
hardcoded then just comment out the
Proc symbolic entry or just Delete it

The key is to look only for a symbolic that points to a value of CART not
SYSDA or DISK
Also important is to capture any other sub-parms in the same complex
symbolic if any and place all on the DD stmt in any order





//ABCD1234 PROC LIB01='ABC.PDS.CTRLCARD',
// DSNOUT='P',
// DSNIN='P',
// UNIT01='CART,VOL=(,,,99),LABEL=EXPDT=99000',
// JOBNAME='XYZZ1234',
// OCLSD='D',
// OCLSP='P'


//SORTIN DD DSN=&DSNIN.ABC.S.ABCD1234.ANCIENT.NONE,
// DISP=SHR,UNIT=SYSDA
// DD DSN=&DSNIN.ABC.S.ABCD1234.MASTER.REPORT,
// DISP=SHR,UNIT=SYSDA
//SORTOUT DD DSN=&DSNOUT.ABC.S.&JOBNAME..ARCHIVE.DETL(+1),
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT01,DATACLAS=COMPRESS,
// DCB=(DSORG=PS,RECFM=FB,LRECL=800,BLKSIZE=0)


For the above SORTOUT DD stmt I want
It to change from
// UNIT=&UNIT01,DATACLAS=COMPRESS,

TO
// UNIT=CART,VOL=(,,,99),LABEL=EXPDT=99000,DATACLAS=COMPRESS,
Or
// UNIT=CART,VOL=(,,,99),LABEL=EXPDT=99000,
// DATACLAS=COMPRESS,




In another Proc the symbolic is named UNIT02 and is defined in the Proc
symbolic table as


// UNIT02='CART,VOL=(,,,99),LABEL=EXPDT=99000',


Proc DD stmts where the symbolic UNIT02 is referenced 13 times

// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,

2 of the DD stmts used are

//OUTRPT1 DD DSN=&DSNOUT.ABC.S.&JOBNAME..BKUP.FILE6,
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// DCB=(DSORG=PS,RECFM=FB,LRECL=320,BLKSIZE=0)
//OUTRPT2 DD DSN=&DSNOUT.ABC.S.&JOBNAME..RELOAD.FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// DCB=(DSORG=PS,RECFM=FB,LRECL=320,BLKSIZE=0)



Regards
Noel Murphy

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX







Please visit our website at
http://financialservicesinc.ubs.com/wealth/E-maildisclaimer.html
for important disclosures and information about our e-mail
policies. For your protection, please do not transmit orders
or instructions by e-mail or include account numbers, Social
Security numbers, credit card numbers, passwords, or other
personal information.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Paul Gilmartin
2017-05-15 16:06:35 UTC
Permalink
Raw Message
Post by Mickey Bee
Personally, I would look at an edit macro for this.
Perhaps. That macro may yet contain much procedural code.

Complexities:

The DD statement as coded may have continuation lines.

Symbol resolution may causea line to overrun column 72,
requiring additional continuation.

JCL continuatiopn is hostile: you may not break for continuation:
o within a symbol name
o within doubled ampersamds or apostrophes.

I hate JCL!

-- gil

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
retired mainframer
2017-05-15 15:55:18 UTC
Permalink
Raw Message
The obvious questions are:

Why are you doing this manually and not letting JES do it for you? It
appears you are trying to prevent a user from changing the value of &UNIT01.
This may do that but the same user could simply use DD overrides to
accomplish the same effect.

Does it matter that this process can cause the proc to fail with a JCL
error? If you replace every occurrence of &UNIT01 on all the DD statements,
JES will complain that the symbolic is not referenced in the proc. You will
also need to remove the definition from the PROC statement.

If any of the following assumptions are false, your code will need to be a
lot more complex:

There is only one proc in the input to your program.
There is only one symbolic of interest in the proc.
The symbolic is defined on a single input record by itself.
You want to change every DD statement and only DD statements that
contain the symbolic.
The text resulting from the replacement will fit within the JCL record
constraints (e.g., columns 4-71)

The following may point you in the right direction:

Read the records in the proc statement (the last record will not have a
terminal comma).
If this record has the symbolic of interest
Save the symbolic name
Extract the text to be substituted while dealing with the
external and internal single quote (tic) marks
Else
Copy the record to the output
Read the remaining records
If this record is the start of a DD statement, set a flag
If the flag is set
If the symbolic is present
Save the following character
Save any non-comment data after this character
If the symbolic is not at the beginning of the record
Generate an output record containing the data up to
the operand containing the symbolic
Generate an output record with the operand and
substituted text and saved character
If saved character is a comma and non-comment data
exists
Generate an output record with the data
Else
Copy the record to the output
If this is last record of the DD statement, reset the flag
Else
Copy record to output
Post by Mickey Bee
-----Original Message-----
Of Noel Murphy
Sent: Monday, May 15, 2017 7:05 AM
Subject: Help on complex variable
Hi all
I need help using Rexx to resolve only one Proc symbolic table entry that
could be named
Post by Mickey Bee
UNIT01 UNIT02 or DEV01 etc.
The symbolic value is always = to CART and may have LABEL or VOL parms as
part of
Post by Mickey Bee
the symbolic resolved value.
All I want to do is look at a Proc and if it has on the DD stmt a symbolic
after the Key
Post by Mickey Bee
word UNIT=&UNIT01 or another name like &DEV01
READ that symbolic from the Proc Symbolic table above and just hardcode it
in the DD
Post by Mickey Bee
stmt with no other changes
The proc could have just one DD using this symbolic or many. The rest of
the DD if using
Post by Mickey Bee
symbolics for the Dataset name etc. I don't want to change. After all DD
stmts that used the
Post by Mickey Bee
symbolic that had a value of CART are now hardcoded then just comment out
the
Post by Mickey Bee
Proc symbolic entry or just Delete it
The key is to look only for a symbolic that points to a value of CART not SYSDA or DISK
Also important is to capture any other sub-parms in the same complex
symbolic if any and
Post by Mickey Bee
place all on the DD stmt in any order
//ABCD1234 PROC LIB01='ABC.PDS.CTRLCARD',
// DSNOUT='P',
// DSNIN='P',
// UNIT01='CART,VOL=(,,,99),LABEL=EXPDT=99000',
// JOBNAME='XYZZ1234',
// OCLSD='D',
// OCLSP='P'
//SORTIN DD DSN=&DSNIN.ABC.S.ABCD1234.ANCIENT.NONE,
// DISP=SHR,UNIT=SYSDA
// DD DSN=&DSNIN.ABC.S.ABCD1234.MASTER.REPORT,
// DISP=SHR,UNIT=SYSDA
//SORTOUT DD DSN=&DSNOUT.ABC.S.&JOBNAME..ARCHIVE.DETL(+1),
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT01,DATACLAS=COMPRESS,
// DCB=(DSORG=PS,RECFM=FB,LRECL=800,BLKSIZE=0)
For the above SORTOUT DD stmt I want
It to change from
// UNIT=&UNIT01,DATACLAS=COMPRESS,
TO
// UNIT=CART,VOL=(,,,99),LABEL=EXPDT=99000,DATACLAS=COMPRESS,
Or
// UNIT=CART,VOL=(,,,99),LABEL=EXPDT=99000,
// DATACLAS=COMPRESS,
In another Proc the symbolic is named UNIT02 and is defined in the Proc symbolic table as
// UNIT02='CART,VOL=(,,,99),LABEL=EXPDT=99000',
Proc DD stmts where the symbolic UNIT02 is referenced 13 times
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
2 of the DD stmts used are
//OUTRPT1 DD DSN=&DSNOUT.ABC.S.&JOBNAME..BKUP.FILE6,
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// DCB=(DSORG=PS,RECFM=FB,LRECL=320,BLKSIZE=0)
//OUTRPT2 DD DSN=&DSNOUT.ABC.S.&JOBNAME..RELOAD.FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// DCB=(DSORG=PS,RECFM=FB,LRECL=320,BLKSIZE=0)
Regards
Noel Murphy
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Paul Gilmartin
2017-05-15 19:15:06 UTC
Permalink
Raw Message
Post by retired mainframer
Does it matter that this process can cause the proc to fail with a JCL
error? If you replace every occurrence of &UNIT01 on all the DD statements,
JES will complain that the symbolic is not referenced in the proc. You will
also need to remove the definition from the PROC statement.
Fortunately, the SET instruction does not replicate this silliness.
IBM designers get smarter, however slowly over decades.

It has always seemed to me exactly backwards that referring to a
symbol that was never defined is quietly ignored; defining a
symbol that is never referenced is fatal. OK, perhaps it is by
oversight or typo. But an Informative message should suffice.

And at times the message has provided too little diagnostic information:
"SYMBOL NOT DEFINED IN PROCEDURE." Which one, dammit! And it
should say "REFERENCED", not "DEFINED".

-- gil

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Noel Murphy
2017-05-15 20:03:27 UTC
Permalink
Raw Message
I am scanning the Proclib looking for
DISP=(,CATLG or DISP=(NEW,CATLG

I have the datasets being created with their Space and DATACLAS values in an external reference list.
I can remove the Label parm and the Vol parm and change UNIT=CART to UNIT=SYSDA along with adding Space and DATACLAS
What I cannot seem to get right is doing this when the UNIT= value is part of a complex symbolic

I wish there was a command or Rexx Pgm that would allow only resolution of a single DD that resolved to a Hardcoded UNIT=CART




Regards

Noel Murphy
UBS AG
CORE Services US-MAINFRAME
Applications Support Group
Internal  - +1(201)352-8289
***@ubs.com
www.ubs.com

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf Of Paul Gilmartin
Sent: Monday, May 15, 2017 3:16 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: Help on complex variable
Post by retired mainframer
Does it matter that this process can cause the proc to fail with a
JCL error? If you replace every occurrence of &UNIT01 on all the DD
statements, JES will complain that the symbolic is not referenced in
the proc. You will also need to remove the definition from the PROC statement.
Fortunately, the SET instruction does not replicate this silliness.
IBM designers get smarter, however slowly over decades.

It has always seemed to me exactly backwards that referring to a symbol that was never defined is quietly ignored; defining a symbol that is never referenced is fatal. OK, perhaps it is by oversight or typo. But an Informative message should suffice.

And at times the message has provided too little diagnostic information:
"SYMBOL NOT DEFINED IN PROCEDURE." Which one, dammit! And it should say "REFERENCED", not "DEFINED".

-- gil

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX

Please visit our website at
http://financialservicesinc.ubs.com/wealth/E-maildisclaimer.html
for important disclosures and information about our e-mail
policies. For your protection, please do not transmit orders
or instructions by e-mail or include account numbers, Social
Security numbers, credit card numbers, passwords, or other
personal information.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Lizette Koehler
2017-05-15 22:15:25 UTC
Permalink
Raw Message
I am still a little confused

If you have an SMS Storage Admin available, then have them update the ACS code
to manage the JCL. They can control what JCL can or cannot use.

You would not need to use a REXX to manage your JCL.

In the ACS Constructs your Storage Admin can allow JCL to override SMS Code or
SMS Code can control the JCL

If the user codes

//DDLBL1 DD DISP=(,CATLG),UNIT=,DCB= and so forth. The ACS code can catch
this and force the job to use what is needed.


JCL and REXX are not a great way to do this.

If you have a series of PROCs, PROGRAMS, USERIDs, etc that can only go to a pool
or TAPE or anything else, SMS Code can probably control it. It would not matter
what the JCL had coded. SMS can be established to override anything in JCL.

The basic idea for SMS is a user can code

//DDLbll DD DISP=,DSN= and the SMS code can fill in the blanks.

Another option is if your shop uses CA JCLCheck, ASG PROJCL, or SEA JCL+ - these
products can enforce shop standards and are very good at restructuring JCL.



Lizette
Post by Mickey Bee
-----Original Message-----
Noel Murphy
Sent: Monday, May 15, 2017 1:01 PM
Subject: Re: [TSO-REXX] Help on complex variable
I am scanning the Proclib looking for
DISP=(,CATLG or DISP=(NEW,CATLG
I have the datasets being created with their Space and DATACLAS values in an
external reference list.
I can remove the Label parm and the Vol parm and change UNIT=CART to
UNIT=SYSDA along with adding Space and DATACLAS What I cannot seem to get
right is doing this when the UNIT= value is part of a complex symbolic
I wish there was a command or Rexx Pgm that would allow only resolution of a
single DD that resolved to a Hardcoded UNIT=CART
Regards
Noel Murphy
UBS AG
CORE Services US-MAINFRAME
Applications Support Group
Internal  - +1(201)352-8289
www.ubs.com
-----Original Message-----
Sent: Monday, May 15, 2017 3:16 PM
Subject: Re: Help on complex variable
Post by retired mainframer
Does it matter that this process can cause the proc to fail with a
JCL error? If you replace every occurrence of &UNIT01 on all the DD
statements, JES will complain that the symbolic is not referenced in
the proc. You will also need to remove the definition from the PROC
statement.
Fortunately, the SET instruction does not replicate this silliness.
IBM designers get smarter, however slowly over decades.
It has always seemed to me exactly backwards that referring to a symbol that
was never defined is quietly ignored; defining a symbol that is never
referenced is fatal. OK, perhaps it is by oversight or typo. But an
Informative message should suffice.
"SYMBOL NOT DEFINED IN PROCEDURE." Which one, dammit! And it should say
"REFERENCED", not "DEFINED".
-- gil
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email to
Please visit our website at
http://financialservicesinc.ubs.com/wealth/E-maildisclaimer.html
for important disclosures and information about our e-mail policies. For your
protection, please do not transmit orders or instructions by e-mail or
include account numbers, Social Security numbers, credit card numbers,
passwords, or other personal information.
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email to
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Bob Bridges
2017-05-17 23:32:50 UTC
Permalink
Raw Message
I like retired-mainframer's question on this, but maybe what I read below is
that you're not planning to ~run~ this JCL, just spot it and record
something about it. If so, then all those (perfectly accurate) cautions
from the others don't really apply. But in that case I'm not sure what
you're asking. You want to do that; fine. But what's the question?

The logic seems to be something like this:

1) Find the PROC statement. (If no PROC statement, skip this member.)
2) Parse out all the symbolic parms in the PROC statement.
3) Examine each symbolic parm as <name>=<value>. If left(<value>,4)='CART'
then store <name> and <value>
4) For each record in the remainder of the JCL, look for "&<symbol>[.]" and
replace it with <value>.
5) If &<symbol> was found in the member, store the result as needed.

The only reason for you to have posted in the first place is that something
about this is causing you problems, but which part?

---
Bob Bridges
***@gmail.com, cell 336 382-7313
***@InfoSecInc.com

/* A fanatic is someone who does what he knows God would do if God knew the
facts of the case. -found at http://www.algonet.se/~parlei/quotes.html */


-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf Of
Noel Murphy
Sent: Monday, May 15, 2017 16:01

I am scanning the Proclib looking for DISP=(,CATLG or DISP=(NEW,CATLG

I have the datasets being created with their Space and DATACLAS values in an
external reference list.
I can remove the Label parm and the Vol parm and change UNIT=CART to
UNIT=SYSDA along with adding Space and DATACLAS What I cannot seem to get
right is doing this when the UNIT= value is part of a complex symbolic

I wish there was a command or Rexx Pgm that would allow only resolution of a
single DD that resolved to a Hardcoded UNIT=CART

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf Of
retired mainframer
Sent: Monday, May 15, 2017 11:56

The obvious questions are:

Why are you doing this manually and not letting JES do it for you? It
appears you are trying to prevent a user from changing the value of &UNIT01.
Post by Mickey Bee
-----Original Message-----
Of Noel Murphy
Post by Mickey Bee
Sent: Monday, May 15, 2017 7:05 AM
I need help using Rexx to resolve only one Proc symbolic table entry
that could be named UNIT01 UNIT02 or DEV01 etc. The symbolic value is
always = to CART and may have LABEL or VOL parms as part of the
symbolic resolved value. All I want to do is look at a Proc and if it
has on the DD stmt a symbolic after the Key word UNIT=&UNIT01 or
another name like &DEV01 READ that symbolic from the Proc Symbolic
table above and just hardcode it in the DD stmt with no other changes
The proc could have just one DD using this symbolic or many. The rest
of the DD if using symbolics for the Dataset name etc. I don't want to
change. After all DD stmts that used the symbolic that had a value of
CART are now hardcoded then just comment out the Proc symbolic entry
or just Delete it
The key is to look only for a symbolic that points to a value of CART
not SYSDA or DISK. Also important is to capture any other sub-parms
in the same complex symbolic if any and place all on the DD stmt in
any order
//ABCD1234 PROC LIB01='ABC.PDS.CTRLCARD',
// DSNOUT='P',
// DSNIN='P',
// UNIT01='CART,VOL=(,,,99),LABEL=EXPDT=99000',
// JOBNAME='XYZZ1234',
// OCLSD='D',
// OCLSP='P'
//SORTIN DD DSN=&DSNIN.ABC.S.ABCD1234.ANCIENT.NONE,
// DISP=SHR,UNIT=SYSDA
// DD DSN=&DSNIN.ABC.S.ABCD1234.MASTER.REPORT,
// DISP=SHR,UNIT=SYSDA
//SORTOUT DD DSN=&DSNOUT.ABC.S.&JOBNAME..ARCHIVE.DETL(+1),
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT01,DATACLAS=COMPRESS,
// DCB=(DSORG=PS,RECFM=FB,LRECL=800,BLKSIZE=0)
For the above SORTOUT DD stmt I want It to change from
// UNIT=&UNIT01,DATACLAS=COMPRESS,
TO
// UNIT=CART,VOL=(,,,99),LABEL=EXPDT=99000,DATACLAS=COMPRESS,
Or
// UNIT=CART,VOL=(,,,99),LABEL=EXPDT=99000,
// DATACLAS=COMPRESS,
In another Proc the symbolic is named UNIT02 and is defined in the Proc symbolic table as
// UNIT02='CART,VOL=(,,,99),LABEL=EXPDT=99000',
Proc DD stmts where the symbolic UNIT02 is referenced 13 times
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
2 of the DD stmts used are
//OUTRPT1 DD DSN=&DSNOUT.ABC.S.&JOBNAME..BKUP.FILE6,
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// DCB=(DSORG=PS,RECFM=FB,LRECL=320,BLKSIZE=0)
//OUTRPT2 DD DSN=&DSNOUT.ABC.S.&JOBNAME..RELOAD.FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// DCB=(DSORG=PS,RECFM=FB,LRECL=320,BLKSIZE=0)
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Lizette Koehler
2017-05-15 15:57:41 UTC
Permalink
Raw Message
I am a little confused as to what problem you are trying to solve. Could you
provide more details on what problem requires this type of change?



If you are replacing a symbolic with a specific coding - this can be very
difficult with JCL.

A JCL statement can only be 71 chars. When a Symbol is changed to a specific
coding

&UNIT01 to UNIT=CART,LABEL=etc. Then you need to adjust the JCL statement into
multiple lines to ensure it does not over run the 71 column limitation.

This makes it very complicated REXX



Lizette
Post by Mickey Bee
-----Original Message-----
Noel Murphy
Sent: Monday, May 15, 2017 7:05 AM
Subject: [TSO-REXX] Help on complex variable
Hi all
I need help using Rexx to resolve only one Proc symbolic table entry that
could be named UNIT01 UNIT02 or DEV01 etc.
The symbolic value is always = to CART and may have LABEL or VOL parms as
part of the symbolic resolved value.
All I want to do is look at a Proc and if it has on the DD stmt a symbolic
after the Key word UNIT=&UNIT01 or another name like &DEV01 READ that
symbolic from the Proc Symbolic table above and just hardcode it in the DD
stmt with no other changes The proc could have just one DD using this
symbolic or many. The rest of the DD if using symbolics for the Dataset name
etc. I don't want to change. After all DD stmts that used the symbolic that
had a value of CART are now hardcoded then just comment out the Proc symbolic
entry or just Delete it
The key is to look only for a symbolic that points to a value of CART not
SYSDA or DISK Also important is to capture any other sub-parms in the same
complex symbolic if any and place all on the DD stmt in any order
//ABCD1234 PROC LIB01='ABC.PDS.CTRLCARD',
// DSNOUT='P',
// DSNIN='P',
// UNIT01='CART,VOL=(,,,99),LABEL=EXPDT=99000',
// JOBNAME='XYZZ1234',
// OCLSD='D',
// OCLSP='P'
//SORTIN DD DSN=&DSNIN.ABC.S.ABCD1234.ANCIENT.NONE,
// DISP=SHR,UNIT=SYSDA
// DD DSN=&DSNIN.ABC.S.ABCD1234.MASTER.REPORT,
// DISP=SHR,UNIT=SYSDA
//SORTOUT DD DSN=&DSNOUT.ABC.S.&JOBNAME..ARCHIVE.DETL(+1),
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT01,DATACLAS=COMPRESS,
// DCB=(DSORG=PS,RECFM=FB,LRECL=800,BLKSIZE=0)
For the above SORTOUT DD stmt I want
It to change from
// UNIT=&UNIT01,DATACLAS=COMPRESS,
TO
// UNIT=CART,VOL=(,,,99),LABEL=EXPDT=99000,DATACLAS=COMPRESS,
Or
// UNIT=CART,VOL=(,,,99),LABEL=EXPDT=99000,
// DATACLAS=COMPRESS,
In another Proc the symbolic is named UNIT02 and is defined in the Proc symbolic table as
// UNIT02='CART,VOL=(,,,99),LABEL=EXPDT=99000',
Proc DD stmts where the symbolic UNIT02 is referenced 13 times
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
2 of the DD stmts used are
//OUTRPT1 DD DSN=&DSNOUT.ABC.S.&JOBNAME..BKUP.FILE6,
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// DCB=(DSORG=PS,RECFM=FB,LRECL=320,BLKSIZE=0)
//OUTRPT2 DD DSN=&DSNOUT.ABC.S.&JOBNAME..RELOAD.FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// DCB=(DSORG=PS,RECFM=FB,LRECL=320,BLKSIZE=0)
Regards
Noel Murphy
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email to
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
IronSphere by SecuriTeam Software
2017-05-15 18:08:29 UTC
Permalink
Raw Message
Ask your syzprog to get you a copy to cppupdte...

ITschsk
Post by Lizette Koehler
I am a little confused as to what problem you are trying to solve. Could you
provide more details on what problem requires this type of change?
If you are replacing a symbolic with a specific coding - this can be very
difficult with JCL.
A JCL statement can only be 71 chars. When a Symbol is changed to a specific
coding
&UNIT01 to UNIT=CART,LABEL=etc. Then you need to adjust the JCL statement into
multiple lines to ensure it does not over run the 71 column limitation.
This makes it very complicated REXX
Lizette
Post by Mickey Bee
-----Original Message-----
Behalf Of
Post by Mickey Bee
Noel Murphy
Sent: Monday, May 15, 2017 7:05 AM
Subject: [TSO-REXX] Help on complex variable
Hi all
I need help using Rexx to resolve only one Proc symbolic table entry that
could be named UNIT01 UNIT02 or DEV01 etc.
The symbolic value is always = to CART and may have LABEL or VOL parms
as
Post by Mickey Bee
part of the symbolic resolved value.
All I want to do is look at a Proc and if it has on the DD stmt a
symbolic
Post by Mickey Bee
after the Key word UNIT=&UNIT01 or another name like &DEV01 READ that
symbolic from the Proc Symbolic table above and just hardcode it in the
DD
Post by Mickey Bee
stmt with no other changes The proc could have just one DD using this
symbolic or many. The rest of the DD if using symbolics for the Dataset
name
Post by Mickey Bee
etc. I don't want to change. After all DD stmts that used the symbolic
that
Post by Mickey Bee
had a value of CART are now hardcoded then just comment out the Proc
symbolic
Post by Mickey Bee
entry or just Delete it
The key is to look only for a symbolic that points to a value of CART not
SYSDA or DISK Also important is to capture any other sub-parms in the
same
Post by Mickey Bee
complex symbolic if any and place all on the DD stmt in any order
//ABCD1234 PROC LIB01='ABC.PDS.CTRLCARD',
// DSNOUT='P',
// DSNIN='P',
// UNIT01='CART,VOL=(,,,99),LABEL=EXPDT=99000',
// JOBNAME='XYZZ1234',
// OCLSD='D',
// OCLSP='P'
//SORTIN DD DSN=&DSNIN.ABC.S.ABCD1234.ANCIENT.NONE,
// DISP=SHR,UNIT=SYSDA
// DD DSN=&DSNIN.ABC.S.ABCD1234.MASTER.REPORT,
// DISP=SHR,UNIT=SYSDA
//SORTOUT DD DSN=&DSNOUT.ABC.S.&JOBNAME..ARCHIVE.DETL(+1),
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT01,DATACLAS=COMPRESS,
// DCB=(DSORG=PS,RECFM=FB,LRECL=800,BLKSIZE=0)
For the above SORTOUT DD stmt I want
It to change from
// UNIT=&UNIT01,DATACLAS=COMPRESS,
TO
// UNIT=CART,VOL=(,,,99),LABEL=
EXPDT=99000,DATACLAS=COMPRESS,
Post by Mickey Bee
Or
// UNIT=CART,VOL=(,,,99),LABEL=EXPDT=99000,
// DATACLAS=COMPRESS,
In another Proc the symbolic is named UNIT02 and is defined in the Proc
symbolic table as
// UNIT02='CART,VOL=(,,,99),LABEL=EXPDT=99000',
Proc DD stmts where the symbolic UNIT02 is referenced 13 times
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// UNIT=&UNIT02,DATACLAS=COMPRESS,
2 of the DD stmts used are
//OUTRPT1 DD DSN=&DSNOUT.ABC.S.&JOBNAME..BKUP.FILE6,
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// DCB=(DSORG=PS,RECFM=FB,LRECL=320,BLKSIZE=0)
//OUTRPT2 DD DSN=&DSNOUT.ABC.S.&JOBNAME..RELOAD.FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT02,DATACLAS=COMPRESS,
// DCB=(DSORG=PS,RECFM=FB,LRECL=320,BLKSIZE=0)
Regards
Noel Murphy
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send
email to
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Loading...