From: Raul on
Is there a tool or script (PERL, C#, or whatever) available that can
extract only the JCL STEPs that generate reports, especially those
using the Xerox DJDE format.

In other words, I'm looking for a tool and/or the logic necessary to
scan JCL text files, extract only the step(s) that print a report and
rebuild a JCL script to print the report(s).

I have figured out the the steps I'm looking for should contain one or
more of the following strings:

"PGM=PAJZDJDE"
"SYSOUT=1"
"SYSOUT=2"
"SYSOUT=3"
"SYSOUT=4"
"SYSOUT=5"
"SYSOUT=6"
"SYSOUT=7"
"SYSOUT=8"
"SYSOUT=9"
"UAPB.OPTICAL"

Also, the JCL files have been exported to our server, so the
tool/script does not have to limited to the mainframe.

Any pointers would be greatly appreciated.

Raul
rault(a)renewal-iis.com

From: epc8 on

Raul wrote:
> Is there a tool or script (PERL, C#, or whatever) available that can
> extract only the JCL STEPs that generate reports, especially those
> using the Xerox DJDE format.
>
> In other words, I'm looking for a tool and/or the logic necessary to
> scan JCL text files, extract only the step(s) that print a report and
> rebuild a JCL script to print the report(s).
>
> I have figured out the the steps I'm looking for should contain one
or
> more of the following strings:
>
> "PGM=PAJZDJDE"
> "SYSOUT=1"
> "SYSOUT=2"
> "SYSOUT=3"
> "SYSOUT=4"
> "SYSOUT=5"
> "SYSOUT=6"
> "SYSOUT=7"
> "SYSOUT=8"
> "SYSOUT=9"
> "UAPB.OPTICAL"
>
> Also, the JCL files have been exported to our server, so the
> tool/script does not have to limited to the mainframe.
>
> Any pointers would be greatly appreciated.
>
> Raul
> rault(a)renewal-iis.com

[OT wrt COBOL]

AWK (or GAWK or MAWK) will do the job easily. The usual AWK program is
of the form:

pattern action

If action is empty, then the default action is to print all lines
matching pattern. Pattern may be a simple string or a "regular
expression"

for example

/SYSOUT=[1-9]/ would match and print all lines containing SYSOUT=n for
n=1..9

From: Colin Campbell on
Raul,
Not to be a smart aleck, but this would be a great reason to write a
COBOL program.

JCL (for z/OS, OS/390, or MVS) is formatted so that you can find the
statement type you want by testing the first two characters. Then, JOB,
EXEC, DD, and many other "//" type statements can be decoded by using
UNSTRING. The first card image of a statement has name (optional),
operation, operand (optional), and comments (optional), delimited by all
space up to the comments. If the operand ends with a comma, then at
least one continuation card image is expected. These have the format
null, operand, comments (optional), again delimited by all space. With
careful use of UNSTRING features, you can string all of the operands
together into one long string for further processing, or later
construction of new statements.

Once you've done the work to be able to read JCL and separate it into
its component parts, you can use the code over and over for different
purposes. Having such a tool at your disposal can make you very popular
with your peers and management!

From: Raul on
Colin,

"Everytime I try and get out, [COBOL] pull[s] me back in...." :)

I'll give it a shot. I didn't think of that.

That brings up another question: Can the members of the JCLLIB PDS be
read in like any other files?

By copy: Does anyone have a COBOL program that does something similar?
Why reinvent the wheel, right?

Later,
Raul

From: jce on
This is what ISPF Edit Macros were born to do....

You can look through something like Dave's Freeware and look to see if there
is something that you can modify in there.

JCE

"Raul" <rault(a)renewal-iis.com> wrote in message
news:1115317178.013405.241800(a)z14g2000cwz.googlegroups.com...
> Is there a tool or script (PERL, C#, or whatever) available that can
> extract only the JCL STEPs that generate reports, especially those
> using the Xerox DJDE format.
>
> In other words, I'm looking for a tool and/or the logic necessary to
> scan JCL text files, extract only the step(s) that print a report and
> rebuild a JCL script to print the report(s).
>
> I have figured out the the steps I'm looking for should contain one or
> more of the following strings:
>
> "PGM=PAJZDJDE"
> "SYSOUT=1"
> "SYSOUT=2"
> "SYSOUT=3"
> "SYSOUT=4"
> "SYSOUT=5"
> "SYSOUT=6"
> "SYSOUT=7"
> "SYSOUT=8"
> "SYSOUT=9"
> "UAPB.OPTICAL"
>
> Also, the JCL files have been exported to our server, so the
> tool/script does not have to limited to the mainframe.
>
> Any pointers would be greatly appreciated.
>
> Raul
> rault(a)renewal-iis.com
>


 |  Next  |  Last
Pages: 1 2
Next: Should COBOL be lockedUP for good?...