robert-ohlen
New User
Joined: 01 Jun 2007 Posts: 11 Location: Soiron
|
|
|
|
I would like to extract some of the JOB sysprint.
I used "EJES" with REXX.
My first step that works well is extracting all the DD JOB file.
Code: |
/* REXX */
delstack
/*rc = syscalls('ON') */
rc = ejesrexx('initapi')
queue "status;sreset;jname myjob IMSTWFIS;hold"
queue "showcols jobname jobid records"
queue ""
address ejes "execapi (prefix JOB_" /* Invoke HOLD */
dsn2= JOB_JobName".workfile"
"delete" dsn2
rc=bpxwdyn("alloc dd(wkf2)",
"da("sysvar(syspref)"."dsn2") new reuse")
do jobrow=1 to JOB_Lines
address ejes "execapi 0 'locate" jobrow "' (prefix JOB_"
say "Processing " JOB_JobName"("JOB_JobId")"
dsn = JOB_JobName"."JOB_JobId".workfile"
"delete" dsn
address ejes "execapi 0 ':ed' (prefix EX_"
if EX_FunName = "EXTRACT" then,
do
address ejes "execapi 0 ':<"dsn"><><><><><><><><CYL><10><10><*>'"
if word(EJES_Msg.1,1) = "EJES162" then,
do
rc=bpxwdyn("alloc dd(wkf)",
"da("sysvar(syspref)"."dsn") old reuse")
"execio * diskr" wkf "(stem" spool. "open finis)"
"execio * diskw" wkf2 "(stem" spool.
rc=bpxwdyn("free dd(wkf)")
say "Read " spool.0 "records from job"
end
"delete" dsn
end
end /* jobrow */
rc=bpxwdyn("free dd(wkf2)")
ejesrc = ejesrexx('termapi')
exit |
But the extraction takes all of DD JOB
Code: |
J
ESMSGLG
JESJCL
JESYSMSG
SYSPRINT
|
How can I will extract only the DD SYSPRINT ? |
|