Has anyone ever published a grammar for JCL?
It might be a great deal of fun to generate a full featured
parser/converter that handles everything...
On Jun 13, 2005, at 4:10 PM, [EMAIL PROTECTED] wrote:
I have a REXX EXEC that should do the trick. Haven't tested it 100%,
so I
can't say there aren't XML "issues", but it should be helpful. It is
written for JES2 with ACCT and Programmer name fields REQUIRED on the
job
card. It also expects correct JCL - no JCL errors in the input.
I based it on some old SAS code; I don't parse JES2 control cards.
Having
worked several places I know that JCL can very greatly from place to
place
so there may be issues, but I would be willing to assist fixing the
code.
I even broke out the DCB sub parameters for you.
I tested it with an output dataset of LRECL 80, but several Linkedit
PARMS
generated a longer line, so an output dataset may have to have an
LRECL of
100 or more.
Send private Email to get the REXX code.
Sample output
<JOB>
<JOBCARD>
<JOBNAME>T000H40B</JOBNAME>
<ACCOUNT>(P900020,1,999)</ACCOUNT>
<PROGRAMMER_ID>'KEN LEIDNER'</PROGRAMMER_ID>
<CLASS>Q</CLASS>
<MSGCLASS>Q</MSGCLASS>
</JOBCARD>
<STEP>
<EXEC>
<STEPNAME>VSTEP2</STEPNAME>
<PGMNAME>GRAPHIX</PGMNAME>
<PARM>'N'</PARM>
<COND>EVEN</COND>
</EXEC>
<OUTPUT>
<NAME>OUTPUT1</NAME>
<CHARS>(GT10,FM10)</CHARS>
<DEST>B1P1</DEST>
<FORMDEF>SIMPLX</FORMDEF>
<PAGEDEF>6LPI</PAGEDEF>
</OUTPUT>
<DD>
<NAME>DATAIN</NAME>
<DSN>&&OUT2</DSN>
<DISP>(OLD,DELETE)</DISP>
</DD>
<DD>
<NAME>SYSOUT</NAME>
<SYSOUT>*</SYSOUT>
</DD>
<DD>
<NAME>PRINTPRM</NAME>
<SYSOUT>*</SYSOUT>
</DD>
<DD>
<NAME>PARMIN</NAME>
<DUMMY></DUMMY>
</DD>
<DD>
<NAME>DATAOUT</NAME>
<SYSOUT>*</SYSOUT>
<OUTPUT>*.OUTPUT1</OUTPUT>
<DCB>
<RECFM>FBA</RECFM>
<BLKSIZE>250</BLKSIZE>
<OPTCD>J</OPTCD>
</DCB>
<COPIES>1</COPIES>
</DD>
</STEP>
</JOB>
Kenneth Leidner
Imagination is more important than knowledge.
Subject: Re: JCL to XML
Miklos Szigetvari wrote:
Hi
I would like to have something converts the JCL, exactly as it is in
your sample.
It is a lot easier to read an xml document rather than writing ones
own
JCL parser.
----------------------------------------------------------------------
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