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
 

 

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: 10210
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 3 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


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