MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need to execute same Program with diff logic for diff files

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
yadav2005
Intermediate


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Wed Jul 30, 2008 6:12 am    Post subject: Need to execute same Program with diff logic for diff files Reply with quote

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
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Wed Jul 30, 2008 7:54 am    Post subject: Reply with quote

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
View user's profile Send private message
yadav2005
Intermediate


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Wed Jul 30, 2008 9:22 pm    Post subject: Reply with quote

Thanks Bill,

Can you plz give some more information how to make use of PARM Value to determine the output file.
Back to top
View user's profile Send private message
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Thu Jul 31, 2008 6:25 am    Post subject: Reply with quote

Or simply assign the output to DUMMY or NULLFILE for the steps where it isn't needed.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Thu Jul 31, 2008 1:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group