Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Extract SYSPRINT with REXX and "EJES"

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
robert-ohlen

New User


Joined: 01 Jun 2007
Posts: 11
Location: Soiron

PostPosted: Mon Apr 27, 2009 3:17 pm    Post subject: Extract SYSPRINT with REXX and "EJES"
Reply with quote

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 ?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7995
Location: Bellevue, IA

PostPosted: Mon Apr 27, 2009 5:41 pm    Post subject:
Reply with quote

Wouldn't this question be better directed to Phoenix Software? Their support team is pretty good at responding in a timely manner to issues.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us