Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to make a jcl to read its spool details

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: how to make a jcl to read its spool details
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: 456
Location: Belgium

PostPosted: Mon Oct 23, 2006 12:35 am    Post subject:
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: 1452
Location: Chicago, IL

PostPosted: Mon Oct 23, 2006 6:12 am    Post subject: Re: how to make a jcl to read its spool details
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    Post subject:
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    Post subject: Re: how to make a jcl to read its spool details
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Read of TDQ fails in LENGERR Tracy Hansen CICS 10 Wed Apr 05, 2017 12:10 am
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us