Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8201
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: 688
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: 186
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: 10374
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: 1932
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: 1827
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: 1932
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 Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 1 Thu Dec 14, 2017 5:46 pm
No new posts Unable to send mail with SMTP commands harsh.saxena579 JCL & VSAM 10 Tue Dec 12, 2017 1:58 pm
No new posts Looping REXX - unable to interrupt RAVISANKAR07 CLIST & REXX 3 Wed Dec 06, 2017 1:08 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts CA Intertest Batch 555shanth CA Products 0 Tue Nov 28, 2017 11:10 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us