|
Hi John Are you looking at one service program that performs the reads for any file? If so then I would consider doing it using embedded SQL rather than file overrides. Using embedded SQL you could pass the file name, library and key information to the service program and then build an appropriate SQL command to retrieve the data and pass it back to your calling program as a data structure. Alternatively, if you're happy with having one file per service program then you could code the key parameters as optional and check to see how many are passed so as to know which key list to use. Regards Jonathan -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of jmajor@xxxxxxxxxxxxxxx Sent: 20 April 2006 14:17 To: rpg400-l@xxxxxxxxxxxx Subject: Dynamic Keys for reading files I am going to be sending a service program the file and the keys for the file and would like to then via the parms have the program read the passed in file with the keys provided. As for the file I was planning on just doing a override via QCMD however I not sure if that is the best route. Also stumped on the dynamic keys for a read or a chain... Sometimes I could have 2 key fields and other times I could have say 5.... Any suggestions would be great Thanks-john
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.