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
 
Batch SDSF to copy job spool into a flat file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
View previous topic :: :: View next topic  
Author Message
hnharish

New User


Joined: 30 Aug 2005
Posts: 22

PostPosted: Thu Aug 11, 2011 4:15 pm    Post subject: Batch SDSF to copy job spool into a flat file
Reply with quote

Hello Team,

I have a requirement to copy the content of the job from the spool into a flat file. I have coded the below JCL and it is working fine but I want to filter the job based on FORM name and Current Date.

Kinldy tell him how to code FORM name and Current Date in the below IFSIN card.

Code:
//PS001    EXEC PGM=SDSF                                 
//ISFOUT   DD  SYSOUT=*                                   
//REPORT   DD  DISP=(,CATLG),DSN=TEST.REPORT,             
//   SPACE=(CYL,(5,10)),RECFM=FBA,LRECL=133,BLKSIZE=0     
//ISFIN    DD  *                                         
O BYRETEST                                               
++ALL                                                     
PRINT FILE REPORT                                         
++ALL                                                     
S BYRETEST                                               
++ALL                                                     
SORT 'STA DT' A                                           
++ALL                                                     
FIND 'BYRETEST' LAST                                     
++XC   


Thanks,
Harish
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Aug 11, 2011 7:12 pm    Post subject:
Reply with quote

Hello,

Post the spool content (only a little should suffice) and what you want your process to produce as output if that sample was processed.
Back to top
View user's profile Send private message
hnharish

New User


Joined: 30 Aug 2005
Posts: 22

PostPosted: Tue Aug 16, 2011 3:19 pm    Post subject: Reply to: Batch SDSF to copy job spool into a flat file
Reply with quote

Hello,

Thanks for the reply.

Please find below the screen print, here I need to filter jobs with FORM id "AAA1". These jobs are bascillay print files that need to be copied to a flat file thru XDC process and then transmitt the file to Distributes server for futther processing.

Currenly we r manualling doing the above process and needs to be automated hence working on the below code.

We tried using FILTER command in the below code but it is not working. Please guide me on the same or let me know is there any other process to accomplish the above task.

O BLSGN10A
++ALL
PRINT FILE REPORT
++ALL
S BLSGN10A
++ALL
FILTER FORM EQ AAA1
++ALL
SORT 'STA DT' A
++ALL
FIND 'BLSGN10A' LAST
++XC

Thanks,
Harish.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Aug 16, 2011 10:46 pm    Post subject:
Reply with quote

Hello,

Is the output even needed in the spool?

Suggest you consider writing the output that needs to be in a file directly to a file. If it is also needed in the spool, copy it from the fle to the spool.
Back to top
View user's profile Send private message
Dan Reyes

New User


Joined: 26 Oct 2008
Posts: 8
Location: Manila

PostPosted: Mon Dec 19, 2011 12:27 pm    Post subject:
Reply with quote

Hi Harish,

I would agree with DSch that the best solution is for the JCL to have an extra step that would save the output file to a dataset. However, if you really need to save the spool output just like XDC does then try the JCL below:

Code:

//CALLSDSF EXEC PGM=SDSF,PARM='ST KEYWORD1_HERE'
//ISFOUT   DD   SYSOUT=*
//ISFIN    DD   *
 SORT POS D
 FIND KEYWORD2_HERE
 ++S
 PT ODSN OUTPUT.SAVELOGS STGB10 MOD
 PT
 PT CLOSE
/*

Notes:
- PARM is for the initial SDSF command to choose sdsf panel
- KEYWORD1_HERE is the jobname or jobname prefix
- then you can do some sort of the output
- KEYWORD2_HERE is the jobname to find
- Use ++S to select the first jobname found
- PT is for printing the output to a dataset with volser and disp
OUTPUT.SAVELOGS is the DSN



Thanks.

- Dan
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Mon Dec 19, 2011 12:50 pm    Post subject: Reply to: Batch SDSF to copy job spool into a flat file
Reply with quote

any reason to resurrect a 4 month old topic ???
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 -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am

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