View previous topic :: View next topic
|
Author |
Message |
hnharish
New User
Joined: 30 Aug 2005 Posts: 23
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
hnharish
New User
Joined: 30 Aug 2005 Posts: 23
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Dan Reyes
New User
Joined: 26 Oct 2008 Posts: 8 Location: Manila
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
any reason to resurrect a 4 month old topic ??? |
|
Back to top |
|
|
|