Supposed a program creates a report. Now I want the report to be created in SDSF spool using a temporary output class let's say T. then I want to check the existence of the report in spool. if the report has only a header and detail, delete the report else change the sysout class to R to be swept in infopac. Is it possible to do via JCL only? I can suppress it via program but I'm thinking to handle it via JCL? any thoughts on how to do it?
current JCL structure- the current code allows the report to be sweep in INFOPAC
//STEP1 EXEC DBABAT3,
// PROG=MYPGM
//RPTFILE DD UNIT=SYSDA,SPACE=(CYL,(2,1))
//SYSIN DD DDNAME=PC
//PC DD DSN=MY.CNTLLIB(RPTCTC),DISP=SHR
the content of RPTCTC
PC1SYSOUT=(R,MYPGMA,STD1)
PC2SYSOUT=(R,MYPGMB,STD1)
Dynamic Change of sysout class via JCL
-
- Global moderator
- Posts: 3006
- Joined: Fri Apr 18, 2008 11:25 pm
- Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
- Referer: www.ibmmainframes.com
Re: Dynamic Change of sysout class via JCL
Is it possible to do via JCL only?
NO
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
-
- Global moderator
- Posts: 2105
- Joined: Thu Jun 03, 2010 6:21 pm
- Skillset: Assembler, JCL, utilities
- Referer: zos.efglobe.com
Re: Dynamic Change of sysout class via JCL
As Mr. Sorichetti says, values specified in JCL are fixed for the duration of the job and cannot be changed. The values specified in your RPTCTC require a program to transform them to their dynamic allocation equivalents, allocate a SYSOUT data set with these attributes, and copy the contents of the data set specified by the RPTFILE DD statement to the SYSOUT data set.
Now why would you want a "temporary output class?" Other than the fact there is no such thing.
Now why would you want a "temporary output class?" Other than the fact there is no such thing.
-
- Posts: 474
- Joined: Thu Mar 10, 2016 5:03 pm
- Skillset: assembler rexx zOS ispf racf smf
- Referer: saw it in the experts foprum thought I could help here
Re: Dynamic Change of sysout class via JCL
No, but...
One solution which springs to mind:
- Write the report to a temporary dataset.
- Use ICETOOL to strip header and trailer records and set a special return code if there are additional records
- IEBGENER to write the temporary dataset to sysout R if ICETOOL return code indicates report data.
Not pure JCL, because that is not possible, but not a programming solution either.
One solution which springs to mind:
- Write the report to a temporary dataset.
- Use ICETOOL to strip header and trailer records and set a special return code if there are additional records
- IEBGENER to write the temporary dataset to sysout R if ICETOOL return code indicates report data.
Not pure JCL, because that is not possible, but not a programming solution either.
-
- Global moderator
- Posts: 3025
- Joined: Sun Jul 04, 2010 12:13 am
- Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
- Referer: Google
- Location: Pushing up the daisies (almost)
Re: Dynamic Change of sysout class via JCL
if the report has only a header and detail, delete the report else change the sysout class to R
Very confusing! Delete the report if it has been created? Then what is there to re-route if there is no report generated?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
Regards
Nic
-
- Similar Topics
- Replies
- Views
- Last post
-
- 5
- 2713
-
by Pedro
View the latest post
Sat Feb 06, 2021 4:56 am
-
- 2
- 1394
-
by PRDVCF
View the latest post
Thu Nov 17, 2022 9:58 pm
-
- 5
- 1777
-
by willy jensen
View the latest post
Fri Dec 03, 2021 8:16 pm
-
- 10
- 3895
-
by Heisenberg
View the latest post
Fri Jun 23, 2023 4:00 pm
-
- 24
- 4676
-
by Pedro
View the latest post
Wed Jan 04, 2023 5:59 am