View previous topic :: View next topic |
Author |
Message |
karunkallore Beginner
Joined: 11 Dec 2004 Posts: 103 Topics: 39
|
Posted: Fri Aug 04, 2006 2:46 am Post subject: To copy data from SYSOUT to a PS file. |
|
|
Hi Friends,
I am stuckt with a tricky issue. Please help me out !!!
Issue
---------------
I need to copy the data that is written to SYSOUT of a step to a PS file. Could some one please guide me?
FILENAM DD SYSOUT=*
Would refer back using IEBGENER help? Any other ways?
Any suggestions most welcome !
Thanks,
Karun. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
karunkallore Beginner
Joined: 11 Dec 2004 Posts: 103 Topics: 39
|
Posted: Fri Aug 04, 2006 6:27 am Post subject: Issue in detail.. |
|
|
Hi Kolsu,
Thank you for the prompt reply ! I guess there is a misatke from my side in explainig the issue clearly.My apologies . Let me now explain it in detail and clear the matters.
I have job which has 10 steps. All these steps have SYSOUT. Now i have some data written to the SYSOUT in step 8 and i want that to be in SYSOUT itself. But apart from that there is a need for me to have this data in SYSOUT in step 8 to be in a PS file which would be used in step 9.
Hope it clears the confusion. Could any one please guide me on this.
Thanks,
Karun. |
|
Back to top |
|
 |
Bill Dennis Advanced

Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Fri Aug 04, 2006 7:49 am Post subject: |
|
|
You will need to change the JCL so that STEP8 allocates SYSOUT to a dataset and then add a new step to print the file too. _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity. |
|
Back to top |
|
 |
karunkallore Beginner
Joined: 11 Dec 2004 Posts: 103 Topics: 39
|
Posted: Mon Aug 07, 2006 2:03 am Post subject: A small update ... |
|
|
Thank you bill. This is the first thing i did. I guess the need is to read the data from SYSOUT ( in some way not writing to file ) in step-8 and write it to a PS file and use that file in step-9. The reason being the program logic that writes the data into the SYSOUT in step-8 needs to be totally revamped ( which at this point is not feasible ) if directly written to a file as multiple open and close of this file would happen so some data would be lost.So I thought if a way is there a way to read from SYSOUT and to write to a file it would be great !!
Thanks,
Karun. |
|
Back to top |
|
 |
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Mon Aug 07, 2006 2:45 am Post subject: |
|
|
Another suggestion: At the end of your job, add a step that invoke SDSF in batch, and print that file to a dataset. For exmple:
Code: |
//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 CICSTCH1
ST
FILTER JOBID EQ STC03477
++?
FIND 'MSGUSR'
++S
PRINT ODSN 'your.output.dataset' * SHR
PRINT 1 9999
PRINT CLOSE
END
EXIT
/* |
O.
________
video review
Last edited by ofer71 on Sat Feb 05, 2011 11:38 am; edited 1 time in total |
|
Back to top |
|
 |
Bill Dennis Advanced

Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Mon Aug 07, 2006 8:38 am Post subject: |
|
|
Karun,
If the file has multiple OPEN/CLOSE, you can use DISP=(MOD,xxxxx), in STEP8 to always add newest data on the PS file. _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity. |
|
Back to top |
|
 |
Steve Coalbran Beginner
Joined: 09 Mar 2005 Posts: 22 Topics: 0 Location: Stockholm, Sweden
|
Posted: Sun Aug 13, 2006 11:40 am Post subject: |
|
|
ofer71 wrote: | Another suggestion: At the end of your job, add a step that invoke SDSF in batch, and print that file to a dataset. For exmple:
Code: |
//ISFIN DD *
PRE CICSTCH1
ST
FILTER JOBID EQ STC03477
|
O. |
This infers that you have preknowledge of both the Job abd Jes number.
Unlikely?
Generating these by Rexx is however feasible...
Code: |
// SET NC='(,CATLG,DELETE)'
//TRAPOUT EXEC PGM=IKJEFT1A,PARM=TRAPOUT
//SYSEXEC DD DISP=SHR,DSN=SE16661.USER.EXEC
//ISFPRT DD DISP=&NC,DSN=&PRJ1..&DAT1..TRAPOUT,
// SPACE=(TRK,(3,3)),LRECL=133,RECFM=FBA
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
|
Code: |
/*=REXX=TRAPOUT======================================================*/
/* write the sdsf controls to view the SYSOUT */
/*===================================================================*/
"ALLOC F(ISFIN) NEW REUSE SP(1)TRACKS UNIT(VIO)"
"ALLOC F(ISFOUT) NEW REUSE SP(10)TRACKS UNIT(VIO)"
sdsf.1 = "PRE" jobname()
sdsf.2 = "ST"
sdsf.3 = "FILTER JOBID EQ" jobid()
sdsf.4 = "++?"
sdsf.5 = "FIND 'MSGUSR'"
sdsf.6 = "++S"
sdsf.7 = "PRINT FILE ISFPRT"
sdsf.8 = "PRINT 1 9999"
sdsf.9 = "PRINT CLOSE"
sdsf.10 = "END"
sdsf.11 = "EXIT"
"EXECIO 11 DISKW ISFIN (STEM SDSF. FINIS"
"CALL *(ISFAFD)"
EXIT
/*===================================================================*/
jobname: PROCEDURE
jbnptr=jbniptr()
IF jbnptr="00000000" THEN jbnptr=jbnsptr()
RETURN STORAGE(jbnptr,8)
jbniptr: PROCEDURE; RETURN C2X(STORAGE(xpx(ascb(),'ac'),4))
jbnsptr: PROCEDURE; RETURN C2X(STORAGE(xpx(ascb(),'b0'),4))
ascb: PROCEDURE; RETURN C2X(STORAGE(xpx(psa(),'224'),4))
jobid: PROCEDURE; RETURN STORAGE(xpx(ssib(),'0c'),8)
ssib: PROCEDURE; RETURN C2X(STORAGE(xpx(jscb(),'13c'),4))
jscb: PROCEDURE; RETURN C2X(STORAGE(xpx(tcb(),'b4'),4))
tcb: PROCEDURE; RETURN C2X(STORAGE(xpx(psa(),'218'),4))
psa: PROCEDURE; RETURN '00'
xpx: PROCEDURE
d = DIGITS()
NUMERIC DIGITS 12
a = D2X(X2D(ARG(1))+X2D(ARG(2)))
NUMERIC DIGITS d
RETURN a
|
(I have't had time to test this but I have done similar before |
|
Back to top |
|
 |
Steve Coalbran Beginner
Joined: 09 Mar 2005 Posts: 22 Topics: 0 Location: Stockholm, Sweden
|
Posted: Sun Aug 13, 2006 12:39 pm Post subject: |
|
|
I tested it and it seems to work, not that I think this is a viable solution in this case, I liked The DISP=MOD + ICEGENER solution myself!.
It only gets the listing from the steps so far unless you have PSYCHIC=YES set in IEASYSP1
[code:1:be86a0b8ea]
SDSF OUTPUT DISPLAY SE16661S JOB13656 DSID 101 LINE 0 COLUMNS 02- 81
COMMAND INPUT ===> SCROLL ===> PAGE
********************************* TOP OF DATA **********************************
J E S 2 J O B L O G -- S Y S T E M S E M 2 -- N O D
19.31.34 JOB13656 ---- SUNDAY, 13 AUG 2006 ----
19.31.34 JOB13656 IRR010I USERID SE16661 IS ASSIGNED TO THIS JOB.
19.31.34 JOB13656 |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Thu Dec 18, 2008 11:37 pm Post subject: |
|
|
Just learned that with ISFASD, you need to do "AFD REFRESH" after "FILTER ...". |
|
Back to top |
|
 |
|
|