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

Batch SDSF to copy job spool into a flat file


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
hnharish

New User


Joined: 30 Aug 2005
Posts: 23

PostPosted: Thu Aug 11, 2011 4:15 pm
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

Moderator Emeritus


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

PostPosted: Thu Aug 11, 2011 7:12 pm
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: 23

PostPosted: Tue Aug 16, 2011 3:19 pm
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

Moderator Emeritus


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

PostPosted: Tue Aug 16, 2011 10:46 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Dec 19, 2011 12:50 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top