View previous topic :: View next topic
|
Author |
Message |
ihatesugar Warnings : 1 New User
Joined: 22 Oct 2006 Posts: 43
|
|
|
|
how can we make a jcl to read its own spool details... actually i need the spool details for further processing once a jcl has run successfully!!! |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
A JCL will never read information from spool or anyother place.
A JCL will submit a program which can read info from its own process thru data areas ( or an subsequent step can do it ). |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Quote: |
i need the spool details for further processing once a jcl has run successfully!!! |
I hope you meant a perticular step here instead of a JCL. You can write those details in to datasets and a subsequent step can be coded to process the details.
Checking FTP logs from earlier step is one fine example of this question. |
|
Back to top |
|
|
ramesh_m
New User
Joined: 27 Sep 2006 Posts: 10 Location: Sydney
|
|
|
|
I think the following code may help you.
If you mention the data set in the sysout card, you will get the spool details in that dataset
eg :
//SYSOUT DD DSN=DACCAR.SYSOUT,DISP=SHR |
|
Back to top |
|
|
ihatesugar Warnings : 1 New User
Joined: 22 Oct 2006 Posts: 43
|
|
|
|
thanks for the responses
my requrement is to pick up the job name, job id and owner details for the job and write is to a dataset... can this be done thru a code...please share the same with me!!!!
thanks |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
search for SDSF |
|
Back to top |
|
|
kaushikmitra
New User
Joined: 11 Apr 2008 Posts: 26 Location: MONTEREY
|
|
|
|
Use the utility ISFAFD.
//STEP02 EXEC PGM=ISFAFD
//PRINTDD DD DISP=SHR,DSN=XXXX.XXXX.XXXX.XXXX
//ISFOUT DD SYSOUT=*
//ISFIN DD *
SET CURSOR OFF
ST your job name
DA your job name
++?
L 6
++S
PRINT FILE PRINTDD
PRINT
PRINT CLOSE
END
/* |
|
Back to top |
|
|
Gousiya Mulla
New User
Joined: 02 Jun 2008 Posts: 87 Location: Bangalore
|
|
|
|
Quote: |
DSN=XXXX.XXXX.XXXX.XXXX |
Hi kaushik ,
I can't see output in the DSN(Assume O/P statement is PRINT FILE PRINTDD) . Will be great if you explain the above . |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
You can use a program or REXX code to get the current JOBNAME, etc from system control blocks while the job is running. Would this work or do you want to wait for the job to end and check the COND CODE?
For jobs that have completed, check the last sample code in THIS post for searching SDSF using REXX. |
|
Back to top |
|
|
kaushikmitra
New User
Joined: 11 Apr 2008 Posts: 26 Location: MONTEREY
|
|
|
|
The JCL ISFAFD use the SDSF commands that we use to see the spool
like ST
? DA etc.
The above JCL is used for this purpose. |
|
Back to top |
|
|
|