|
Dave, Thanks for the reply. The method you described here is the method I'm using to test my logic, however I was hoping for a method that is available in COBOL, where you could specify file 1 as FQADSPUPB UF E K DISK then specify file 2 as FQADSPUPB UF E K DISK rename DMDSPUPB where the internal name of the file is DMDSPUPB, but it would be compiled using the format/data definition from the external file QADSPUPB. If there is no other method available, I will just use the method I'm already using. Thanks anyway >>> "Kahn, David [JNJFR]" <DKahn1@JNJFR.JNJ.com> 09/09 2:36 PM >>> Alan, There are a number of ways to do this. Possibly the simplest is to create a file, or 2 files, based on QADSPUPB but with different names. This is incredibly easy to do. All you have to do is run DSPUSRPRF USRPRF(*ALL) OUTPUT(*OUTFILE) OUTFILE(mylib/bigfile). You now have bigfile in mylib with all the profile details in it. You may want to call the other file weefile. Either repeat the previous process or simply CRTDUPOBJ bigfile mylib *FILE *SAME weefile DATA(*NO). Use bigfile and weefile directly in your program. This avoids you having to do OVRDBF either at compile or run time. All you have to do is a CLRPFM on weefile before reloading it. Unless you really, really need to have the profile information up to the second I'd advise you to run the DSPUSRPRF as a daily scheduled job at a quiet time during the night. It's then ready for instant use. Also make sure that you use object security on bigfile and weefile to keep out the hoi polloi. Dave Kahn Johnson & Johnson International (Ethicon) France Phone : +33 1 55 00 3180 Email : dkahn1@jnjfr.jnj.com (work) dkahn@cix.co.uk (home) -----Message d'origine----- De: alan shore [mailto:SHOREA@dime.com] Date: 09 September 1999 17:49 À: RPG400-L@midrange.com Objet: Duplicate file format I am creating a program that needs to display to the requestor ALL the User Profile names on the system. (sub-file techniques) The requestor then chooses which profile (s) that need to be analyzed. I am using the command DSPUSRPRF USRPRF(*ALL) OUTPUT(*OUTFILE) OUTFILE(QTEMP/filename). This will create a file using the format QSYS/QADSPUPB. This will be input to the RPG program. My F-spec for this file will be FQADSPUPB UF E K DISK The output file for the chosen User Profiles needs to be in the same format. The Question is:- how do I code my RPG program so that my output file uses the same format QADSPUPB (NOTE - I know about PREFIX, but I cannot (or can I) use the same file name (QADSPUPB). +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.