|
Writing a program defined screen shouldn't be that hard... just use DSPFFD to see what positions you need to input/output stuff to. However, I wonder if it wouldn't be better in the long run to make it externally defined? Obviously, you'd have to do something like "eval SDIV2 = SDIV" (for each SDIV field) after each read of the screen... But how many places does the screen get read? On Wed, 18 Apr 2001, Jim Langston wrote: > I am modifying a vendors program putting in a subfile into a > display file (thanks for all the help on this). Now I am in > the RPG source, which was RPG III. I converted this to RPG IV > using CVTRPGSRC and recompiled and it runs fine using the > display file I modified, although I have yet to change the RPG > program to use the subfile. > > Now I get to the hard part. This program was, apparently, > converted from a S36 program who knows how long ago, but no one > ever bothered to declare the files as externally defined. > > Including the display file. > > So now I have a quandary. I either have to go about modifying the > program to use the external declarations for the display file, or > learn how to use a display file subfile using internal file specs. > > I would think it would be easiest to simply make the file externally > defined and change the field names... but I'm running into stuff like > this: > > ISTR002FM NS 01 1 C1 > I 2 3 SDIV > I 2 3 SDIV1 > I 2 3 SDIV2 > I 2 3 SDIV3 > I 4 33 CONAME > ... > > D DS > D BLCKEY 1 31 > D K29 1 29 > D CBLKEY 1 14 > D SDIV1 1 2 > ... > > D DS > D ACTKEY 1 17 > D SCUST3 1 6 > D SDIV3 7 8 > ... > > D DS > D UDATA2 1 32 > D UBL2 1 14 > D DIV2 1 2 > > As you can see, the field in positions 2 and 3 has be defined 4 > different times! SDIV, SDIV1, SDIV2, SDIV3. They obviously did > this (it was the same way in the originally RPG III code, except the > DSs were described in the I specs instead of the D specs) because you > can't put the same field in more than one different data structure. > > So... if I make the display file externally defined, I only get one > one definition of the division (SDIV) and I can't get this program to > compile anymore without fixing the program to move the SDIV to the > different key fields before chaining. Which will probably produce > bugs one way or another. > > So, how hard is it to use a sufile as program defined (which I really, > really hate to do). > > Regards, > > Jim Langston +--- | 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-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.