Posted: Fri Jun 03, 2005 1:26 pm Post subject: change in the JCL
Hi
I have problem in changing the JCL. Currently we have library where all JCLs are stored. Many of the Jcls contain DEST=PB. This will send the reprots Pittney bose server. But we need to send the reprots only two days in a week. Other days we should not run the step that would send the reprots to Pittney bose server.
Currently we are keeping different JCLs that do not have the step that would send to Pittney bose server. But our IT management want to keep only one set of jobs for both situations and change automatically when we do not want send the reports.
I want to know what is the best way to do this automatically. I thought of writing the COBOL program that would the change the all the JCLs. Please let me know is there any simpler to way to fix the issuee
Joined: 10 Dec 2004 Posts: 110 Topics: 8 Location: Colorado USA
Posted: Fri Jun 03, 2005 1:40 pm Post subject:
One way would be to set it up to run or not run the step that does this based upon a condition code. You could then build a program to read a control card that would indicate whether or not the data should be sent, and set the condition code appropriately. You would then have to run this step in each job, and set up the proper condition code checking. Once this was done, you would only have to make one modification (to the parm card), and have it be effective system wide.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Fri Jun 03, 2005 1:50 pm Post subject:
Eswar,
Just add the following 2 steps before the step which sends the reports to pittney bose server.
The first step will unload 1 records from the db2 table which will contain the day of the week. The DAYOFWEEK function returns an integer in the range of 1 to 7 that represents the day of the week where 1 is Sunday and 7 is Saturday. And in the next step we validate this 1 record file and set with a return code. let us say you want to send the reports to PB server only monday and tuesday. So monday is 2 and tuesday is 3. So we use an include card to include only these 2 records. If the day is indeed monday or tuesady then the return code from step0200 will be 0 else it would be 4.
Now use this cond code to skip the transmission of reports using COND or IF-THEN-ELSE construct.
I tried your two steps. But in our installation the second step is not giving return code of 4 when it is not finding a record. Please let me know any thing I need to change.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Sun Jun 05, 2005 8:56 pm Post subject:
beswar,
Please post your sysout messages. I am guessing that you have a older version of sort. If your shop has DFSORT then you need the PTF from March 2004. If your shop has syncsort then you need syncsort 3.7 with TPF2A or higher to work for the NULLOUT parm.
Note that you'll need the Dec, 2004 DFSORT PTF to use RC4. Without RC4, DFSORT will pass back RC=12 instead of RC=4. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Thanks you very much for your(Frank and Kolusu) replies. we didn't have DFSSOrt r14. Hence I got a return code of 12 instead of RC=4. I will try using Idcams and that might work to check the empty file.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Jun 06, 2005 2:44 pm Post subject:
Quote:
we didn't have DFSSOrt r14.
I assume you mean you have DFSORT R14, but you don't have the Dec, 2004 PTF. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum