View previous topic :: View next topic |
Author |
Message |
yadav2005 Intermediate

Joined: 10 Jan 2005 Posts: 348 Topics: 144
|
Posted: Wed Jul 30, 2008 6:12 am Post subject: Need to execute same Program with diff logic for diff files |
|
|
Members,
There is an existing Easytrive Program which is creating report for a customer whichever is passed an input file.Now the same program is run for different customers in different steps and we get report as well.Now I want to modify the program to create output files for two different customers say X & Y only and also create report.
How can we achieve this request wherein I have to create files only for X & Y ,do i need to create a new program with existing logic and adding up new output file logic or is there any other way.Basically after creating the files for X & Y i will send it through some FTP System.
For example:
Code: |
//STEP010 EXEC PGM=ABC - EASYTRIVE PROGRAM
//INPUT DD DSN=INPUT FILE - SAY CUSTOMER A
//PRINT DD SYSOUT=*
/*
//STEP020 EXEC PGM=ABC - EASYTRIVE PROGRAM
//INPUT DD DSN=INPUT FILE - SAY CUSTOMER B
//PRINT DD SYSOUT=*
/*
//STEP030 EXEC PGM=ABC - EASYTRIVE PROGRAM
//INPUT DD DSN=INPUT FILE - SAY CUSTOMER C
//PRINT DD SYSOUT=*
/*
//STEP040 EXEC PGM=ABC - EASYTRIVE PROGRAM
//INPUT DD DSN=INPUT FILE - SAY CUSTOMER X
//OUTPUT DD DSN=NEW OUTPUT FILE FOR CUSTOMER X
//PRINT DD SYSOUT=*
/*
//STEP050 EXEC PGM=ABC - EASYTRIVE PROGRAM
//INPUT DD DSN=INPUT FILE - SAY CUSTOMER Y
//OUTPUT DD DSN=NEW OUTPUT FILE FOR CUSTOMER Y
//PRINT DD SYSOUT=*
//
|
|
|
Back to top |
|
 |
Bill Dennis Advanced

Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Wed Jul 30, 2008 7:54 am Post subject: |
|
|
You could create the file every time and just DUMMY the output file in the steps for A,B and C.
Another method is to set a PARM value you could test in your program logic to determine whether to write the OUTPUT file.
Writing programs allows us to be creative and search for the best solution. _________________ 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 |
|
 |
yadav2005 Intermediate

Joined: 10 Jan 2005 Posts: 348 Topics: 144
|
Posted: Wed Jul 30, 2008 9:22 pm Post subject: |
|
|
Thanks Bill,
Can you plz give some more information how to make use of PARM Value to determine the output file. |
|
Back to top |
|
 |
CraigG Intermediate
Joined: 02 May 2007 Posts: 202 Topics: 0 Location: Viginia, USA
|
Posted: Thu Jul 31, 2008 6:25 am Post subject: |
|
|
Or simply assign the output to DUMMY or NULLFILE for the steps where it isn't needed. |
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Thu Jul 31, 2008 1:57 pm Post subject: |
|
|
if parameter-passed = 'some value' then write to file a
else if parameter-passed = 'another value' then write file b
else write file c _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
 |
|
|