MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Selective copy from sdsf to dataset
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
apru
Beginner


Joined: 15 Feb 2014
Posts: 25
Topics: 6

PostPosted: Fri Mar 14, 2014 3:56 am    Post subject: Selective copy from sdsf to dataset Reply with quote

Is is possible to extract only the step code and error code from spool to dataset ??....I tried the SDSF batch utility,but it is copying the entire contents of a job from spool to dataset...Should we make use of any REXX utility for this???
Back to top
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Fri Mar 14, 2014 11:25 am    Post subject: Reply with quote

One way to get whay you want is to copy from spool to dataset, then read that dataset and only copy what you want.
_________________
All the best,

di
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Fri Mar 14, 2014 12:21 pm    Post subject: Reply with quote

Define 'Rexx utility'. Rexx is a programming language and as such you can write programs using it. These programs may, or may not, be utilities. Rexx can communicate with certain software e.g. SDSF by using the interface descried in thet software's documentation.
I have never used the SDSF/Rexx interface so I do not know the extent to which Rexx can use SDSF facilities. Certainly you can unload the job to a dataset and then have the rexx program extract the information that you want.
I presume this is the same query that is active on another forum. If so I should lock the other topic.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Mar 14, 2014 1:54 pm    Post subject: Reply with quote

apru,

Copy the spool into a dataset and then filter it based on IEF142I message which gives you the stepname and the cond code.

Code:

//STEP0100 EXEC PGM=SORT                                         
//SYSOUT   DD SYSOUT=*                                           
//SORTIN   DD DISP=SHR,DSN=Your spool dataset from SDSF                   
//SORTOUT  DD SYSOUT=*,RECFM=FB                                 
//SYSIN    DD *                                                 
  OPTION COPY                                                   
  INCLUDE COND=(2,7,CH,EQ,C'IEF142I')                           
  INREC PARSE=(%01=(STARTAFT=C'IEF142I ',ENDBEFR=C' ',FIXLEN=8),
               %02=(ENDBEFR=C' ',FIXLEN=8),                     
               %03=(STARTAFT=C'COND CODE ',FIXLEN=8)),           
  BUILD=(%01,C'|',%02,C'|',%03,JFY=(SHIFT=LEFT))                 
//*                                                             
Back to top
View user's profile Send private message Send e-mail Visit poster's website
apru
Beginner


Joined: 15 Feb 2014
Posts: 25
Topics: 6

PostPosted: Sun Mar 16, 2014 12:18 pm    Post subject: Reply with quote

Thanks a lot kolusu...
Back to top
View user's profile Send private message
apru
Beginner


Joined: 15 Feb 2014
Posts: 25
Topics: 6

PostPosted: Sun Mar 16, 2014 11:01 pm    Post subject: Reply with quote

Is it possible to filter only the IEF1421 message of the step which was executed at the last...????
Back to top
View user's profile Send private message
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Tue Mar 18, 2014 10:57 am    Post subject: Reply with quote

If you follow Kolusu's suggestion, how about a simple f 'IEF1421' last on the dataset ?
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Mar 18, 2014 12:18 pm    Post subject: Reply with quote

apru wrote:
Is it possible to filter only the IEF1421 message of the step which was executed at the last...????


Add the following line to above shown control cards and you will just get the last step return codes

Code:

OUTFIL REMOVECC,NODETAIL,TRAILER1=(1,26)   

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Mar 19, 2014 1:48 am    Post subject: Reply with quote

SDSF has a rich Rexx interface. Googling SDSF REXX shows the doc as the 1st item (Using SDSF with the REXX programming language)
_________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
Back to top
View user's profile Send private message Visit poster's website
apru
Beginner


Joined: 15 Feb 2014
Posts: 25
Topics: 6

PostPosted: Wed Mar 19, 2014 11:10 pm    Post subject: Reply with quote

Thanks a lot Kolusu..But I have a few queries:

1.Will there be IEF142I messages in spool for all errors(including jcl errors,abends etc) ???.....Or should we filter IEF344I messages for JCL error information??....

2.In the event of error,is it possible to filter the reason for error from spool to dataset apart from the step code and cond code?...
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Mar 20, 2014 11:18 am    Post subject: Reply with quote

apru wrote:
Thanks a lot Kolusu..But I have a few queries:

1.Will there be IEF142I messages in spool for all errors(including jcl errors,abends etc) ???.....


You will NOT have an IEF142I message for JCL Errors ,You will have IEFC452I which tells you the reason code for JCL errors.

apru wrote:
Or should we filter IEF344I messages for JCL error information??....


What does IEF344I contain? It is specific to volume allocation and how is it related to JCL errors? JCL errors can be anything from a simple typo to a dataset not found.


apru wrote:

2.In the event of error,is it possible to filter the reason for error from spool to dataset apart from the step code and cond code?...


You need to check for the message IEF450I in case of abend and strip out the necessary details.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
apru
Beginner


Joined: 15 Feb 2014
Posts: 25
Topics: 6

PostPosted: Tue Mar 25, 2014 6:53 am    Post subject: Reply with quote

Thanks a lot Kolusu...I have some queries regarding the spool message code..

1.Should I filter IEF472I , IEF142I , IEE122I , IEE124I ,IEF452I , IEFC452I messages to capture the step code and condition code for all the possible errors and abends???

2.Can I accomplish this by including all the above conditions in INCLUDE COND using OR operator ?

3.Apart from the step code and condition code,how can I filter few lines which describe the reason for the error??....Is there any way to capture this information for any type of error??

********************************************************
Actually my requirement is to to copy the error information from spool to dataset when a job scheduled using TWS OPC ends in error.

I am using automatic recovery for this purpose.When a job ends in error ,I will be invoking another application through OPC recover statement to copy required information from spool to dataset.So my code should be able to filter error information for any error incurred.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Mar 25, 2014 12:40 pm    Post subject: Reply with quote

apru wrote:

Actually my requirement is to to copy the error information from spool to dataset when a job scheduled using TWS OPC ends in error.


Why are you trying to re-invent the wheel? If I remember correctly, OPC already has a section where it lists all the error codes. Why are you trying to build something which already has the information?
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
apru
Beginner


Joined: 15 Feb 2014
Posts: 25
Topics: 6

PostPosted: Wed Mar 26, 2014 8:13 am    Post subject: Reply with quote

In opc , I was able to view only the error code..not the step information and reason for error....I want error code, step info, reason for error in ps file...couldnt get all this using opc....I even tried the EQQYCAIN batch utility to generate report but couldnt get the required information in the ps file...
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Mar 26, 2014 12:00 pm    Post subject: Reply with quote

apru,

Did you look into the SELECT parm of EQQYCAIN utility?

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group