|
I don't think that you really exempt the program in question from being retooled. For example, let's take the jump from BPCS 405 to BPCS 6. In that jump they changed the size of most all the fields. Including such draconian items as Item number. In an ERP system that's no small potatoes. Your programs, at the very least, would have to be recompiled to take advantage of external data structures. Unless, of course, you issued a systems edict that you were not to exceed the size of the old field, or take advantage of any other new file change, because you might have to recompile programs. Or if you changed a key from packed to character you might have an issue with GetKey(MyPackedNbr); In an existing program. Something that can change from file, to data area, etc, might make sense to externalize. And we do that with Company name. Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com <eulersid-400@xxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 02/02/2005 01:02 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc Subject Re: Externalizing I/O was RPG read loops Simple. By doing it this way, you exempt the program in question from having to be retooled, recompiled, redistributed, and reintegrated into every user's system because of a file change. Moreover, you could change the input from a file to a data queue, an Mq queue, IFS file,etc. in a manner completely transparent to the program in question. Cheers, Eric Filson rob@xxxxxxxxx wrote: Paul, I think you're the first person that I heard of, that wasn't the person in charge of writing the access programs, that actually liked this scenario. Why an end developer would like to replace chain(e) myfile; // now actually do some real work with the fields with getFilename(); MyWorkField1=GetField(field1); MyWorkField2=GetField(field2); ... // now actually do some real work with the fields rather escapes me. Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com "Paul Morgan" Sent by: rpg400-l-bounces@xxxxxxxxxxxx 02/02/2005 10:18 AM Please respond to RPG programming on the AS400 / iSeries To rpg400-l@xxxxxxxxxxxx cc Subject Re: RPG read loops Richard, Great setup. I once contracted at a shop that did this with OPM programs even before ILE. You never put a file into production without it's access program. Applications programs never referred to a file directly but did all access through the IO program. Even all the file logicals were in that same program so you could select which logical to use with a parameter on the call. Paul -- Paul Morgan Senior Programmer Analyst - Retail J. Jill Group 100 Birch Pond Drive, PO Box 2009 Tilton, NH 03276-2009 Phone: (603) 266-2117 Fax: (603) 266-2333 "Richard ECUYER" wrote > I did it. > > For each file (physical, logical, with ot without key), i build one source > with some procedures : > Get_Filename (CHAIN) > Set_filename (SET, LL, GT) > Exists_filename (SETLL without read) > Read_filename (READ, readp, readE, READPE) > Insert_filename (write) > Delete_filename (delete) > Unlock_filename (unlock) > Update_filename (update) > dft_filename (populate the exported datastructure with defaul > values) > All "READ" procedures include a parm (*on/*off) to lock or not the record) > > Create a module and one service pgm by file > a ds (io_filename) is exported. > > It is not done by hand, i create a little pgm that get file decription and > create all sources needed (procedure interface, module...) > > When i use suche a procedure, i include 3 lines : > > /copy of the bnddir (it is one with only IO service pgm) > /copy of procedure interface > an external DS (linked with the file) if i use data from the file. > > the only think (for me) to watch is in a loop that call a program that read > the same file i must make a setgt before the next read. > all procedure return *off if request fald or *on if not. > > My loop are like this : > > Dow Read_filename (*off : '*NEXT' : '*EQ' : Key1 : Key2 ...) > do staff > Enddo > > One cool thing is that i can change the file (add new fields at the end) > without getting level error (new field will not be usable until i recompile) > I have a performance gain, and all IO for a file are in ONE source. > It is new for us, but all find it easy and pretty to use. > > My little piece of 0,1 euro. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.