Re: JCL SET command and instream SYSIn

2008-06-30 Thread Bass, Walter W

> 
> I agree that SET variables are very useful. But I think that 
> they could
> be more useful if they were more like UNIX environment variables -
> accessible to running programs. Perhaps via the ASASYMBM 
> interface. The
> 100 char limit on PARM, limits how much data you can pass to a program
> using it.
> 
> Another weird idea just occurred to me (though I may have 
> read it here).
> A subsystem, written by IBM, which "emulates" a sequential file. But
> what is read are the subsystem parameters on the JCL. Each 
> subparameter
> would be a separate record when read by the program. This 
> could be used
> to replace small SYSIN-like data with data which includes symbol
> substitution.
> 
> Eg:
> 
> //DEL EXEC PGM=IDCAMS
> //SYSPRINT DD SYSOUT=*
> //SYSIN DD SUBSYS=(READ,
> // ' DEL &DSN',
> // ' SET MAXCC=0'),
> // DCB=(RECFM=FB,LRECL=80,BLKSISE=80)
> 
> --
> John McKown
> Senior Systems Programmer


Also available on the CBT updates as file 779 is a program called
SYMBSUB which reads an 80 column file, does symbol substitutions using
values pulled from jobs own JESJCL and writes the file back out.  Using
the example from above, the equivalent function would be coded as
follows:

// SET &DSN=SOME.DSN.NAME
//DOSUBS   EXEC PGM=SYMBSUB
//CNTL001I DD *
 DEL &DSN
 SET MAXCC=0
//CNTL001O DD DSN=&&TMPSYSIN,DISP=(NEW,PASS),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
// UNIT=SYSDA,SPACE=(TRK,1)
//SYSOUT   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//DEL  EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSINDD DSN=&&TMPSYSIN,DISP=OLD

With this there is no need to worry about limitations of parm lengths or
multiple job steps for multiple lines of data.  The program will also
handle more than one input and output file in a single step.  Just
supply matching CNTLxxxI and CNTLxxxO DD names and it will process them
all.

HTH,
Bill Bass
Senior Applications Developer
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



Re: JCL SET command and instream SYSIN

2008-06-30 Thread Itschak Mugzach
As this problem drove me crazy today, I decided to developed some code. I
wrote a rexx exec that is an ISPF macro that replaces the buildin send
command, It does the following: 
 

*   save changes done until macro starts.
*   Force undo on and nosave in the member's profile to keep the
variables for future use
*   Scan the member for ORDER and INCLUDE card.
*   Allocate and read the INCLUDEd member (currently only one).  
*   create a table of variable (the set xxx become &xxx) and values
(after the eq sign.
*   find all Instream "DD *" data (Don't care for the DD name). 
*   Change all variables with the values (only those found in "DD *"
pseudo datasets.
*   submits the job with a TSO SUBMIT command
*   Undo all changes done  after the macro starts (to keep the variables
in the text).

So, what I have done is to put "converter" like step before the converter.
The program is almost done. Email me if you want a copy. I think that future
use will be to add support for more then one include member and to change
external allocation of SYSIN type datasets into instream for variable
substitution. 
 
The only problem I can see is that I have to replace the buildin submit
macro with the one I wrote (It is personal, kept in my private ispf profile
and not shared), or to name the macro other then SUB (for example SUBX). It
then be included from your sysproc library. 
 
Will be happy to get more ideas on this.
 
Regards, 
 
Itschak  
 
 
 
| Itschak Mugzach | Director | SecuriTeam Software |
| Email: [EMAIL PROTECTED] | Mob: +972 522 986404 | Skype: Itschak
Mugzach | Web: www.Securiteam.co.il    | 
 

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



Re: JCL SET command and instream SYSIn

2008-06-30 Thread Rick Fochtman

--
A JCL SET statement value can also be passed and resolved as a PARM= 
string, so it is possible to write a program in your favorite language 
that takes the PARM= value and writes the data to a DD allocation in a 
job-step. And if you must have multiple data lines substituted, for 
example as SYSIN, use multiple job-steps with DISP=NEW for the first 
step and DISP=MOD for each additional job-step.


I am contributing a "helper program" that might be useful in this area. 
It substitutes PARM= values into control statements and writes them to a 
DD named SYSIN, then invokes a program that's also specified in the PARM 
field. It's called UTILITY and I'm about 15 minutes away from sending it 
to the CBTTAPE site. A private E-Mail request will get you a copy.


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



Re: JCL SET command and instream SYSIn

2008-06-30 Thread McKown, John
> -Original Message-
> From: IBM Mainframe Discussion List 
> [mailto:[EMAIL PROTECTED] On Behalf Of Barkow, Eileen
> Sent: Monday, June 30, 2008 9:22 AM
> To: IBM-MAIN@BAMA.UA.EDU
> Subject: Re: JCL SET command and instream SYSIn
> 
> I have a program that
> processes the SET command values passed to it in the parm field and it
> then
> uses them to set condition codes. 
>  The program passes numbers as condition codes and has a few reserved
> words it recognizes from the SET commands to pass condition 
> code values.
> 
> The SET commands are very useful.
> 

I agree that SET variables are very useful. But I think that they could
be more useful if they were more like UNIX environment variables -
accessible to running programs. Perhaps via the ASASYMBM interface. The
100 char limit on PARM, limits how much data you can pass to a program
using it.

Another weird idea just occurred to me (though I may have read it here).
A subsystem, written by IBM, which "emulates" a sequential file. But
what is read are the subsystem parameters on the JCL. Each subparameter
would be a separate record when read by the program. This could be used
to replace small SYSIN-like data with data which includes symbol
substitution.

Eg:

//DEL EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD SUBSYS=(READ,
// ' DEL &DSN',
// ' SET MAXCC=0'),
// DCB=(RECFM=FB,LRECL=80,BLKSISE=80)

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it.  

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



Re: JCL SET command and instream SYSIn

2008-06-30 Thread Barkow, Eileen
I have a program that
processes the SET command values passed to it in the parm field and it
then
uses them to set condition codes. 
 The program passes numbers as condition codes and has a few reserved
words it recognizes from the SET commands to pass condition code values.

The SET commands are very useful.

Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of McKown, John
Sent: Monday, June 30, 2008 9:56 AM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: JCL SET command and instream SYSIn

> -Original Message-
> From: IBM Mainframe Discussion List 
> [mailto:[EMAIL PROTECTED] On Behalf Of Paul Gilmartin
> Sent: Monday, June 30, 2008 8:37 AM
> To: IBM-MAIN@BAMA.UA.EDU
> Subject: Re: JCL SET command and instream SYSIn
[snip]
> Gee, that's ugly.  And not quite modular: you have to first install
> the helper program.  I suppose it could be inline SYSIN to a leading
> assembler step.  Or Rexx in an IEBGENER step.  Gee, I still wish
> Rexx could access SET symbol values (Yeah, I know; use SDSF to
> read the JCL text.)
> 
> -- gil

The biggest "problem" to me with JCL SET commands is that the are not
really JCL. They don't exist once the converter uses them. Sort of like
HLASM GBLx variables. They don't generate any text records themselves.
They just modify the values in other instructions. Likewise, JCL SET
variables and values do not result in "internal text" records.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it.  

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

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



Re: JCL SET command and instream SYSIn

2008-06-30 Thread Clement Clarke
Jol allows this.  You can set up a symbolic variable, or use one of the 
pre-defined variables, and have it replaced on your card file.


For example, %DAY is set up by Jol

Then...

DCL X * REPLACE;
Today is %DAY
Month %MONTH
EOF;

Print x;   /* Print the card file */

See www.ozemail.com.au/~oscarptyltd


Cheers, 


Clem


[EMAIL PROTECTED] wrote:

I already tried that and it doesn't work: A jcl set variable orks only on real 
JCL not on instream SYSIN (DD *). Any workaround? Any alternative to modify JCL 
and SYSIN (for example, deleting/definning datasets with IDCAMS) at one 
parameter without having to use ISPF CHANGE ALL?

Thanks for your ideas

Itschak 



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

  


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



Re: JCL SET command and instream SYSIn

2008-06-30 Thread McKown, John
> -Original Message-
> From: IBM Mainframe Discussion List 
> [mailto:[EMAIL PROTECTED] On Behalf Of Paul Gilmartin
> Sent: Monday, June 30, 2008 8:37 AM
> To: IBM-MAIN@BAMA.UA.EDU
> Subject: Re: JCL SET command and instream SYSIn
[snip]
> Gee, that's ugly.  And not quite modular: you have to first install
> the helper program.  I suppose it could be inline SYSIN to a leading
> assembler step.  Or Rexx in an IEBGENER step.  Gee, I still wish
> Rexx could access SET symbol values (Yeah, I know; use SDSF to
> read the JCL text.)
> 
> -- gil

The biggest "problem" to me with JCL SET commands is that the are not
really JCL. They don't exist once the converter uses them. Sort of like
HLASM GBLx variables. They don't generate any text records themselves.
They just modify the values in other instructions. Likewise, JCL SET
variables and values do not result in "internal text" records.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it.  

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



Re: JCL SET command and instream SYSIn

2008-06-30 Thread Paul Gilmartin
On Mon, 30 Jun 2008 07:53:35 -0500, Scott Barry wrote:

>A JCL SET statement value can also be passed and resolved as a PARM=
>string, so it is possible to write a program in your favorite language that 
>takes
>the PARM= value and writes the data to a DD allocation in a job-step.  And if
>you must have multiple data lines substituted, for example as SYSIN, use
>multiple job-steps with DISP=NEW for the first step and DISP=MOD for each
>additional job-step.
>
Actually, for a temporary data set, you can use DISP=(MOD,PASS) for
every step because it starts out empty.  This makes it easier to
rearrange the order of steps if necessary.

>At one site I support, this technique is used to build IDCAMS control
>statements for execution.
>
Gee, that's ugly.  And not quite modular: you have to first install
the helper program.  I suppose it could be inline SYSIN to a leading
assembler step.  Or Rexx in an IEBGENER step.  Gee, I still wish
Rexx could access SET symbol values (Yeah, I know; use SDSF to
read the JCL text.)

-- gil

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



Re: JCL SET command and instream SYSIn

2008-06-30 Thread Scott Barry
A JCL SET statement value can also be passed and resolved as a PARM= 
string, so it is possible to write a program in your favorite language that 
takes 
the PARM= value and writes the data to a DD allocation in a job-step.  And if 
you must have multiple data lines substituted, for example as SYSIN, use 
multiple job-steps with DISP=NEW for the first step and DISP=MOD for each 
additional job-step. 

At one site I support, this technique is used to build IDCAMS control 
statements for execution.

Scott Barry
SBBWorks, Inc.

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



Re: JCL SET command and instream SYSIn

2008-06-30 Thread Paul Gilmartin
On Mon, 30 Jun 2008 03:28:19 -0600, [EMAIL PROTECTED] wrote:

>I already tried that and it doesn't work: A jcl set variable orks only on real 
>JCL not on instream SYSIN (DD *). Any workaround? Any alternative to modify 
>JCL and SYSIN (for example, deleting/definning datasets with IDCAMS) at one 
>parameter without having to use ISPF CHANGE ALL?
>
Nope.

Thanks for your ideas
>
I keep some of my JCL members, including one which renames data sets
and defines aliases with IDCAMS, as UNIX shell scripts in which the
actual JCL appears as a here-document.  The shell scripts filter
and submit the JCL using parameter substitution in the simpler cases
and sed or awk in the more complicated.  One substitution I regularly
do is to create data set names incorporating the current date, not
possible with pure batch JCL.

-- gil

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



Re: JCL SET command and instream SYSIn

2008-06-30 Thread Ted MacNEIL
>I already tried that and it doesn't work: A jcl set variable orks only on real 
>JCL not on instream SYSIN (DD *). Any workaround?

This has been discussed many times (see the archives).
The answer is NO.
And, this is documented in the JCL manual(s).

-
Too busy driving to stop for gas!

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