For Programmers: Free Programming Magazines  


Home > Archive > Cobol > May 2005 > JCL Builder or script HELP









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author JCL Builder or script HELP
Raul

2005-05-05, 3:55 pm

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@renewal-iis.com

epc8@juno.com

2005-05-05, 8:55 pm


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

Colin Campbell

2005-05-06, 3:55 am

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!

Raul

2005-05-06, 3:55 am

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

jce

2005-05-06, 3:55 am

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@renewal-iis.com> wrote in message
news:1115317178.013405.241800@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@renewal-iis.com
>



docdwarf@panix.com

2005-05-06, 8:55 am

In article <1115317178.013405.241800@z14g2000cwz.googlegroups.com>,
Raul <rault@renewal-iis.com> wrote:

[snip]

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


SUPERC will do this, I believe.

DD
docdwarf@panix.com

2005-05-10, 8:55 pm

In article <1115317178.013405.241800@z14g2000cwz.googlegroups.com>,
Raul <rault@renewal-iis.com> wrote:

[snip]

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


SUPERC will do this, I believe.

DD
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com