Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Retrieving ISPF 'MESSAGE' lines - possible?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
Author Message
NetSerfer

New User


Joined: 16 Jun 2005
Posts: 1

PostPosted: Thu Jun 16, 2005 10:35 pm    Post subject: Retrieving ISPF 'MESSAGE' lines - possible?
Reply with quote

Hi all.

I'm in a Big Iron shop working with a JCL checker called 'JEM' (at least, that's the command line for it). It throws up a series of messages showing me what it didn't like about the JCL it's checking, including files it didn't find. Most of the time, I'm looking for a test version of a production file and, if it's not there, I want to create a test copy from the production file. So, I'd like to write a REXX macro that will grab these messages, check for a file name and write IDCAMS instructions for the create and repro.

So, is it possible to grab message lines from the editor? If so, how? I have the ISPF Edit/Edit Macros book from IBM and it wasn't helpful...

Here's a screen cap showing what I mean:


Code:

 .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
   File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help
 ???????????????????????????????????????????????????????????????????????????????
 EDIT       SSS049.JCL.LIBRARY(A710BX13) - 01.06            Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR
 ****** ***************************** Top of Data ******************************
 ==MSG> *** ERROR SUMMARY AND COUNTS ***   JEM  6.2.4A    06/16/2005  10:45:29
 ==MSG>    31  ADVISORY LEVEL
 ==MSG>     2  WARNING LEVEL
 ==MSG>    30  ERROR LEVEL
 ==MSG>    63  TOTAL ISSUED        0 SUPPRESSED.
 ==MSG>      THE HIGHEST SEVERITY CODE ENCOUNTERED WAS    08.
 ==MSG>  LABEL   SV MSG.NO.    ERROR MESSAGE
 ==MSG> -------- -- --------   -------------------------------------------------
 ==MSG> .JAAA     8 DSS4050E - DATA SET NOT FOUND IN CATALOG
 ==MSG> .JAAA     0 DSS8900A - DSN = "VX.A710.C13.S01.VB5100.VCBRE.X "
 ==MSG> .JAAA     8 DSS4050E - DATA SET NOT FOUND IN CATALOG
 ==MSG> .JAAA     0 DSS8900A - DSN = "VX.A710.C13.S01.VB5000.VTAXDG.X "
 ==MSG> .JAAA     8 DSS4050E - DATA SET NOT FOUND IN CATALOG
 ==MSG> .JAAA     0 DSS8900A - DSN = "VX.A710.C13.S01.VH3320.VSMRF.X "
 ==MSG> .JAAA     8 DSS4050E - DATA SET NOT FOUND IN CATALOG
 ==MSG> .JAAA     0 DSS8900A - DSN = "VX.A.U13.V01.FA.VACDT "
 ==MSG> .JAAA     8 DSS4050E - DATA SET NOT FOUND IN CATALOG
 ==MSG> .JAAA     0 DSS8900A - DSN = "VX.A.D13.V01.VPBCTR.VBCTR "
Back to top
View user's profile Send private message
References
PostPosted: Thu Jun 16, 2005 10:35 pm    Post subject: Re: Retrieving ISPF 'MESSAGE' lines - possible? Reply with quote

MGIndaco

Moderator


Joined: 10 Mar 2005
Posts: 479
Location: Milan, Italy

PostPosted: Fri Jun 17, 2005 10:04 pm    Post subject:
Reply with quote

This is a very intresting question...
JEM is an ISPF extension of TYPRUN and manual don't talk about it...

I think that in background mode through a Rexx program you can have some chance outtrapping the messages but I've not JEM, JSCAN, JJ programs and so I can't try it...but with a simple Rexx I can go to SDSF and copy my sysout to a File. Otherwise, if don't want use a Rexx you can use SDSF utility to do the same and after use a Rexx to check errors.

This is a sample of Rexx code:
Code:
/*% NOCOMMENT REXX         */
/* PROGRAMMA: xxxxxxxx     */
/* AUTORE   : MGIndaco     */
/* ENV.     : TP        */

Queue "//"USERID()"X JOB ...,TYPRUN=SCAN"     
Queue "//STEP010I EXEC PGM=IEFBR14"                                     
Queue "$$"                                                     
Rc = OutTrap(Out.)                                             
Address TSO "SUBMIT * END($$)"                                 
j = Out.0                                                       
Pars Var Out.j 'JOB' JID 'SUBMITTED' .                         
Call SysCalls 'ON'                                             
Do Forever                                                       
   "STATUS "JID                                                     
   j = Out.0                                                       
   If Pos('ON OUTPUT QUEUE',Out.j) > 0 Then Leave                   
   Address SysCall "SLEEP 1"                                     
End                                                             
Call SysCalls 'OFF'                                             
Rc = OutTrap('OFF')                                             
JclDsn = "'"SysVar('SysPref')'.JCL.T'TIME('S')"'"               
Address TSO "OUTPUT "JID" NOKEEP PRINT("JclDsn")"               
Address ISPEXEC "VIEW DATASET("JclDsn")"                       
Address TSO "DEL "JclDsn                                       
Exit Rc                         


To have a SDSF sample look for the SDSF Guide & Reference in the Manual section of this forum(I never used it but from the manual it do what you need...)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1