On Fri, 20 Jul 2007 09:27:32 -0500, Ed Gould <[EMAIL PROTECTED]> wrote:
>I have little doubt you
>can do it in rexx but how many people would be able to debug it (if
>need be).
>
At least as many as could for any program written in any other language
considering rexx syntax is fairly simple (one reason why it is a popular).
In my particular case... if you've ever looked at programs I write for
human consumption, I tend to document every line of code or at least
have detailed comment blocks about a section of code that might
be confusing. But really... this stuff isn't rocket science. What's
in the records is well documented in the SMF manual. I can share
a snippet of the code:
JOBNAME = Substr(INREC,IDENTOFF,8) /* jobname */
PROGNAME = Substr(INREC,IDENTOFF+8,8) /* program name */
STEPNAME = Substr(INREC,IDENTOFF+16,8) /* step name */
JESID = Substr(INREC,IDENTOFF+32,8) /* JES job identifier */
CLS = Substr(INREC,IDENTOFF+42,1) /* job class (jobs only) */
STEPIND = Substr(INREC,COMPOFF+2,1) /* step term indicator */
CHKIND7 = C2d(Bitand(STEPIND,'01'x)) /* chk for x '01' (bit 7) */
if CHKIND7 >= 1 then RTCD = 'FLUSH' /* bit on - step flushed */
else do /* bit off -step not flushed*/
CHKIND6 = C2d(Bitand(STEPIND,'02'x)) /* check for x'02' (bit 6) */
if CHKIND6 >= 2 then do /* bit on - step abended */
CODEIND = Substr(INREC,COMPOFF,1) /* code indicator */
CHKCODE1 = C2d(Bitand(CODEIND,'80'x)) /* check high order bit */
if CHKCODE1 >= 128 then do /* bit on - user abend */
RTCD = Substr(INREC,COMPOFF,2) /* user abend code */
RTCD = C2d(RTCD) -32768 /* convert to decimal */
RTCD = Right(RTCD,4,'0') /* pad with zeros */
RTCD = 'U'||RTCD /* abend is UNNNN */
end
else do
RTCD = Substr(INREC,COMPOFF,2) /* system abend code */
RTCD = C2x(RTCD) /* convert to character */
RTCD = Right(RTCD,3,'0') /* pad with zeros */
RTCD = 'S'||RTCD /* abend is SNNN */
end
end
else do /* bit off - normal end of step */
RTCD = Substr(INREC,COMPOFF,2) /* step completion code */
RTCD = C2d(RTCD) /* convert to decimal */
if RTCD >9999 then nop
else
RTCD = Right(RTCD,4,'0') /* pad with zeros - RC = NNNN */
end
end
--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group - ZFUS G-ITO
mailto:[EMAIL PROTECTED]
z/OS and OS390 expert at http://searchDataCenter.com/ateExperts/
Systems Programming expert at http://expertanswercenter.techtarget.com/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.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