IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to make a jcl to read its spool details


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ihatesugar
Warnings : 1

New User


Joined: 22 Oct 2006
Posts: 43

PostPosted: Sun Oct 22, 2006 4:10 pm
Reply with quote

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
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Mon Oct 23, 2006 12:35 am
Reply with quote

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
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Mon Oct 23, 2006 6:12 am
Reply with quote

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
View user's profile Send private message
ramesh_m

New User


Joined: 27 Sep 2006
Posts: 10
Location: Sydney

PostPosted: Mon Oct 23, 2006 8:31 am
Reply with quote

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
View user's profile Send private message
ihatesugar
Warnings : 1

New User


Joined: 22 Oct 2006
Posts: 43

PostPosted: Wed Oct 25, 2006 10:46 am
Reply with quote

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
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Wed Oct 25, 2006 11:23 am
Reply with quote

search for SDSF
Back to top
View user's profile Send private message
kaushikmitra

New User


Joined: 11 Apr 2008
Posts: 26
Location: MONTEREY

PostPosted: Fri Jul 25, 2008 11:30 am
Reply with quote

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
View user's profile Send private message
Gousiya Mulla

New User


Joined: 02 Jun 2008
Posts: 87
Location: Bangalore

PostPosted: Fri Jul 25, 2008 8:12 pm
Reply with quote

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
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Fri Jul 25, 2008 9:37 pm
Reply with quote

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
View user's profile Send private message
kaushikmitra

New User


Joined: 11 Apr 2008
Posts: 26
Location: MONTEREY

PostPosted: Fri Jul 25, 2008 11:07 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts trying to make sense of keylists TSO/ISPF 11
No new posts Random read in ESDS file by using RBA JCL & VSAM 6
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts Search string in job at regular Spool... CLIST & REXX 0
Search our Forums:

Back to Top