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

Unable to copy data from spool in a dataset via Batch job.


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

New User


Joined: 26 Oct 2016
Posts: 5
Location: INDIA

PostPosted: Fri Jul 28, 2017 9:10 pm
Reply with quote

Hello all,

I have tried extract the spool data of a job in a dataset but not have been unable to do so.Not sure what exactly i am missing.

Code:
//TDPSPARM JOB 0000,                                     
//             'LIVE TEMPLATE QUERY',CLASS=D,MSGCLASS=U, 
//         NOTIFY=&SYSUID                                 
//BSDSF  EXEC PGM=ISFAFD,PARM='++30,256'                 
//ISFOUT   DD SYSOUT=*                                   
//SYSUDUMP DD SYSOUT=*                                   
//SYSPRINT DD SYSOUT=*                                   
//SYSTSPRT DD SYSOUT=*                                   
//SYSOUT   DD SYSOUT=*                                   
//ISFIN    DD *                                           
PRE TDPSPARM                                             
ST                                                       
++?                                                       
FIND 'SYSTSPRT'                                           
++S                                                       
PRINT ODSN 'TIM.SPOOL.NEW' * SHR                         
PRINT 1 9999                                             
PRINT CLOSE                                               
END                                                       
EXIT                                                     
/*                                                       
//                 


I also tried giving dataset name in SYSPRINT above but dataset is blank.
Is that due to some authorization error or the environment doesnot support this utility.Not sure though.
Can you all help me in figuring out if i have missed anything.I checked some of the earlier post but they seem to be dormant so i posted here.My humble apologies just incase i broke any standard norms followed on this forum.

regards
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8569
Location: Dubuque, Iowa, USA

PostPosted: Fri Jul 28, 2017 9:21 pm
Reply with quote

You have a JOB named SYSTSPRT? That is what your FIND command is saying.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 756
Location: Pennsylvania

PostPosted: Fri Jul 28, 2017 10:04 pm
Reply with quote

I encountered this recently and this is how I got it to work.

I will modify your JCL.

Your dataset will contain more than just the output you want. The screens traversed will be shown.

I added a SORT step to extract the data I really wanted.

There may be a better way, but this worked for me.

Code:
/TDPSPARM JOB 0000,
// 'LIVE TEMPLATE QUERY',CLASS=D,MSGCLASS=U,
// NOTIFY=&SYSUID
//BSDSF EXEC PGM=ISFAFD,PARM='++30,256'
//ISFOUT DD DSN=TIM.SPOOL.NEW,DISP=SHR
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//ISFIN DD *
PRE TDPSPARM
ST
++?
FIND 'SYSTSPRT'
++S
++ALL
/*
//
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 443
Location: Denmark

PostPosted: Sat Jul 29, 2017 1:46 pm
Reply with quote

I strongly advise using the SDSF REXX API, see the manual 'SDSF Operation and Customization' chapter 'Using SDSF with the REXX programming
language'. It can be a bit daunting at first, but it provides a much better interface to spool data.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10765
Location: italy

PostPosted: Sat Jul 29, 2017 4:41 pm
Reply with quote

once upon a time I posted quite a few snippets ( TESTED AND WORKING ) on how to use the SDSF REXX interface to access a job output
search the forum with
"SDSF REXX"
checking the search for all the words button
and with enrico* as user

one of them
ibmmainframes.com/viewtopic.php?t=54926&highlight=
Back to top
View user's profile Send private message
srikant314

New User


Joined: 26 Oct 2016
Posts: 5
Location: INDIA

PostPosted: Sun Aug 06, 2017 6:42 pm
Reply with quote

Hello Everyone,

Thanks for all the suggestions.
I am able to copy the spool in the dataset.
The issue with my JCL above was that i was using a dataset that had organisation as space.I changed it as PS and it is now able to gather the details in it.

Regards
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Aug 07, 2017 7:10 pm
Reply with quote

No such thing as "organisation as space". What do you really mean?
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2632
Location: NYC,USA

PostPosted: Mon Aug 07, 2017 10:57 pm
Reply with quote

Quote:
No such thing as "organisation as space". What do you really mean?
DSORG =spaces ( of source later, TS realized the basic, that's not one of the valid value) icon_cool.gif
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Tue Aug 08, 2017 3:56 am
Reply with quote

Quote:
DSORG =spaces ( of source later, TS realized the basic, that's not one of the valid value)

That is not in his posted JCL so you cannot assume that that is what he meant. Clarification is still needed,
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 Unable to retrieve Datasets Names usi... CLIST & REXX 18
No new posts View GDG data which is copied from a ... JCL & VSAM 2
No new posts JCL (SET) variables in input stream data JCL & VSAM 0
No new posts Issues with outrec overlay while extr... SYNCSORT 7
This topic is locked: you cannot edit posts or make replies. ICETool reporting 2 das old dataset DFSORT/ICETOOL 13
Search our Forums:

Back to Top