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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
srikant314

New User


Joined: 26 Oct 2016
Posts: 2
Location: INDIA

PostPosted: Fri Jul 28, 2017 9:10 pm    Post subject: Unable to copy data from spool in a dataset via Batch job.
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: 8132
Location: East Dubuque, Illinois, USA

PostPosted: Fri Jul 28, 2017 9:21 pm    Post subject:
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: 674
Location: Pennsylvania

PostPosted: Fri Jul 28, 2017 10:04 pm    Post subject:
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: 155
Location: Switzerland

PostPosted: Sat Jul 29, 2017 1:46 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10292
Location: italy

PostPosted: Sat Jul 29, 2017 4:41 pm    Post subject: Reply to: Unable to copy data from spool in a dataset via Batch job.
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
http://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: 2
Location: INDIA

PostPosted: Sun Aug 06, 2017 6:42 pm    Post subject: Unable to copy data from spool in a dataset via Batch job
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: 1846
Location: UK

PostPosted: Mon Aug 07, 2017 7:10 pm    Post subject:
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

Senior Member


Joined: 21 Sep 2010
Posts: 1742
Location: NY,USA

PostPosted: Mon Aug 07, 2017 10:57 pm    Post subject:
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: 1846
Location: UK

PostPosted: Tue Aug 08, 2017 3:56 am    Post subject:
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    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 Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts copying data without knowing location Arun Raj DFSORT/ICETOOL 12 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm


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