How can I write the joblog in the spool on normal end of a
job step and direct the joblog to a dataset only if the step
abends?

Answers were Sorted based on User's Feedback



How can I write the joblog in the spool on normal end of a job step and direct the joblog to a data..

Answer / venkat

If you have a sysabend or sysudump dd name in the job then
it captures the Job log upon abnormal termination in to the
dataset... Else will route it to spool or sar according to
the msgclass given.. If msgclass=o then it will route to
spool if msgclass=d it will route to sar

Is This Answer Correct ?    4 Yes 1 No

How can I write the joblog in the spool on normal end of a job step and direct the joblog to a data..

Answer / devang

ONE HAS TO ENTER MSGCLASS=(,0) IN THE JOBCARD TO OBTAIN THE
DESIRED OUTCOME

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More JCL Interview Questions

My JCL has 4 steps that execute PROC’s P1, P2, P3 and P4 as shown below //P1 EXEC PROC=P1 //P2 EXEC PROC=P2 //P3 EXEC PROC=P3 //P4 EXEC PROC=P4 There are four steps S1, S2, S3 and S4 in each PROC’s (i.e. P1, P2, P3 and P4) I want to execute only step S2 of PROC P2 and no other steps or PROC’s. How do you achieve this?

4 Answers   IMS,


What is DYNAMBR in jcl?

2 Answers   CTS,


I have Job A and Job B. I want to trigger Job B from Job A. Please advise.

2 Answers   Wipro,


what's the significance of freespace(0 0) and freespace(100 100)

3 Answers  


List the various advantages of using jcl language?

0 Answers  






Suppose i have 2 steps in my pgm. Step1- creates a file, Step2 - generates report from file in step1, What changes have to be made in Step2, so that if the file in Step1 is empty Step2 should not be executed? No changes to be made to Step1.

4 Answers   TCS,


If job is submitted with typerun = hold then how can we submit the same job?

3 Answers   Wipro,


I have a sequential file in which there are 50 records. Now I want to copy all the 50 records in the reverse order into a new file? The last record in the original file should be the first record in the new file. How can I do it?

4 Answers   IBM, TCS,


How does jcl act on a cobol code?

0 Answers  


We have 100 steps in a procedure and we need to run the jcl and execute only 25th step in the proc and not the remaining steps. How can we do it?

5 Answers   IBM, JPMorgan Chase,


If there are five steps in a JCL i have to execute the 3rd step, bypass the 4th step and execute the 5th step how do i do this?

13 Answers   Cognizant, Convergys, IBM, TCS, Wipro,


I have two input files i/p1 name id-key flag date i/p 2 name id-key date if id-key matches in the both the files then it should write the output file from i/p1 with flag 'Y'. It should be done thru JCL sort card ,Please provide the info on this. ---Note : output file should have all records from i/p1 with proper Flag.

2 Answers  


Categories