View previous topic :: View next topic |
Author |
Message |
apru Beginner
Joined: 15 Feb 2014 Posts: 25 Topics: 6
|
Posted: Fri Mar 14, 2014 3:56 am Post subject: Selective copy from sdsf to dataset |
|
|
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 |
|
 |
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Fri Mar 14, 2014 11:25 am Post subject: |
|
|
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 |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Fri Mar 14, 2014 12:21 pm Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Mar 14, 2014 1:54 pm Post subject: |
|
|
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 |
|
 |
apru Beginner
Joined: 15 Feb 2014 Posts: 25 Topics: 6
|
Posted: Sun Mar 16, 2014 12:18 pm Post subject: |
|
|
Thanks a lot kolusu... |
|
Back to top |
|
 |
apru Beginner
Joined: 15 Feb 2014 Posts: 25 Topics: 6
|
Posted: Sun Mar 16, 2014 11:01 pm Post subject: |
|
|
Is it possible to filter only the IEF1421 message of the step which was executed at the last...???? |
|
Back to top |
|
 |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
|
Posted: Tue Mar 18, 2014 10:57 am Post subject: |
|
|
If you follow Kolusu's suggestion, how about a simple f 'IEF1421' last on the dataset ? _________________ Michael |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue Mar 18, 2014 12:18 pm Post subject: |
|
|
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 |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Mar 19, 2014 1:48 am Post subject: |
|
|
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 |
|
 |
apru Beginner
Joined: 15 Feb 2014 Posts: 25 Topics: 6
|
Posted: Wed Mar 19, 2014 11:10 pm Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Mar 20, 2014 11:18 am Post subject: |
|
|
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 |
|
 |
apru Beginner
Joined: 15 Feb 2014 Posts: 25 Topics: 6
|
Posted: Tue Mar 25, 2014 6:53 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue Mar 25, 2014 12:40 pm Post subject: |
|
|
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 |
|
 |
apru Beginner
Joined: 15 Feb 2014 Posts: 25 Topics: 6
|
Posted: Wed Mar 26, 2014 8:13 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Mar 26, 2014 12:00 pm Post subject: |
|
|
apru,
Did you look into the SELECT parm of EQQYCAIN utility?
Kolusu |
|
Back to top |
|
 |
|
|