View previous topic :: View next topic
|
Author |
Message |
sophia
New User
Joined: 30 Jun 2007 Posts: 19 Location: United States
|
|
|
|
Hi Everyone
I'm working on a report generated via QMF here is the step
//**********************************************************************
//* PS0020 (DB@QMFBT) GENERATE QMF REPORT FOR S&P <===
//**********************************************************************
//*
//PS0020 EXEC DB@QMFBT,
//* CTL=&CTL,
// ENV=&ENV,
// TIME=(1000),
// DB2ID=&DB2ID
//DSQPRINT DD SYSOUT=(I,REPORTID)
//SYSIN DD DSN=MY.CNTLLIB(CTCCRD),
// DISP=SHR
My problem is I need to create a backup of the report. I have coded DSQPRINT that way because when I try to sweep the report in Viewdirect it does not breakdown into multiple section.
Is it possible to save the information from the sysout to a dataset |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Yes, search for SDSF and SAVE and see what you get |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
If you are running the job ab initio, have DSQPRINT write directly to a data set rather than sysout.
If class I sysout is held, you can copy it to a data set via (E)JES (and probably SDSF, but we don't use that here, so I can't say for sure). |
|
Back to top |
|
|
sophia
New User
Joined: 30 Jun 2007 Posts: 19 Location: United States
|
|
|
|
Can it be coded as next step in the jCL? I want to retain the step above then add another step to transfer it in a temp dataset then create a 3rd step to save it in a GDG. would that be possible?
I tried to add this step but I'm getting an error message
//PS0030 EXEC UTSORT,
// CTL=&CTL,
// SORTCTL=COSRTCPY
//SORTIN DD SYSOUT=(I,REPORTID)
//SORTOUT DD DSN=MY.FILE,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(100,50),RLSE),
// DCB=(RECFM=FB,LRECL=133,BLKSIZE=0)
// |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Yes, using SDSF as a subsequent step.
The SDSF can be invoked using REXX which can also be used to get some more details from the current job to ensure that the correct JES element gets copied. |
|
Back to top |
|
|
sophia
New User
Joined: 30 Jun 2007 Posts: 19 Location: United States
|
|
|
|
Do you have a sample code that I can follow? |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
Quote: |
I want to retain the step above then add another step to transfer it in a temp dataset |
Wouldn't it be simpler to write it to dataset in the first step and then simply add a step to IEBGENER that dataset to SYSOUT=(I,REPORTID) ??
Garry. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Very basically
Code: |
//SDSF EXEC PGM=SDSF,PARM='++250,133'
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//ISFOUT DD SYSOUT=*
//ISFIN DD *
PRE UID*
H
FIND 'uidJOB'
++?
FIND 'JESMSGLG'
++S
PRINT ODSN 'uid.TEST.SDSF1'
PRINT 1 9999
PRINT CLOSE
END
EXIT |
Although there is a very good red book available from the IBM site for using the newer REXX / SDSF interfaces. |
|
Back to top |
|
|
sophia
New User
Joined: 30 Jun 2007 Posts: 19 Location: United States
|
|
|
|
Thanks Guys! will try both your suggestions |
|
Back to top |
|
|
sophia
New User
Joined: 30 Jun 2007 Posts: 19 Location: United States
|
|
|
|
Did I apply it correctly? the job doesn't recognized the lines from //ISFIN
//PS0030 EXEC PGM=SDSF,PARM='++250,133'
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//ISFOUT DD SYSOUT=*
//ISFIN DD *
PRE JOBNAME
H
FIND 'JOBNAME'
++?
FIND 'JESMSGLG'
++S
PRINT ODSN 'DATASET NAME'
PRINT 1 9999
PRINT CLOSE
END
EXIT
/* |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
I see some changes in the card which you showed and the one expat posted. Could that be a problem. |
|
Back to top |
|
|
sophia
New User
Joined: 30 Jun 2007 Posts: 19 Location: United States
|
|
|
|
Hi Arun,
My bad was doing in stream inside the proc.
Hi Expat,
Thanks! I was able to get the desired result that I need with your suggestion. I have modified it a bit
PROC
//PS0030 EXEC PGM=SDSF,PARM='++250,133'
//ISFOUT DD DSN=DATASET NAME,DISP=SHR
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//DATAOUT DD DSN=DATASET NAME,DISP=SHR
//ISFIN DD DSN=MY.CTLCRD(SDSF2),DISP=SHR
MY.CTLCRD
ST
PRE JOBNAME
FILTER JOBNAME EQ JOBNAME
FIND 'JOBNAME'
++?
FIND 'DSQPRINT'
++S
PRINT FILE DATAOUT
PRINT 1 999
PRINT CLOSE
END
I will just create additional CTC because I'm running the proc for 12 jobs Thanks for all of your help |
|
Back to top |
|
|
|