70 pts.
 RPGLE
I need to change primary and secondary file into full procedure file. Can anybody help me?

Software/Hardware used:
software
ASKED: January 29, 2013  2:21 PM
UPDATED: January 29, 2013  2:28 PM

Answer Wiki:
Thanks for coming to ITKE The simple answer is to tell you to change your F specs to "F"ull procedural and just code the I/O logic in your calc specs. That being said, do you have any access to source code that uses this technique or do you have any experience with this type of processing? If not, you really should take a class or purchase a book or two. Once you get started on your project, and have specific questions, please come back and ask them.
Last Wiki Answer Submitted:  January 30, 2013  4:29 am  by  JSDHFKJHA   290 pts.
All Answer Wiki Contributors:  JSDHFKJHA   290 pts. , CharlieBrowne   32,785 pts. , Michael Tidmarsh   11,380 pts. , eductn   70 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Without seeing the code there is no way of knowing the scope of this change.
Contral break processing and O-spec output control might be linked directly to the primary and secondary files P/S specs.
Primary file will need to be read in the main processing loop .. which probably didn’t exist in the previous code.  Secondary files will need to be chained to at the appropriate times.
To make this change you must understand how the program currently works.

 44,060 pts.

 

A ‘P’rimary file will generally be replaced by a straight READ-loop around the main calculation specs. A ‘S’econdary file, however, is going to require some thought.
 
Secondary file processing can also require READ-loops. There are often more secondary records for a given matching key value than there are primary records for the key. And there is consideration needed for missing primaries and missing secondaries, and for EOF against either file.
 
As Phil mentions, issues involving control breaks (‘level’ breaks) and O-spec output also must be considered. Output is likely going to need to be significantly restructured.
 
Overall, unless there is a strong reason for making the change, I would recommend against it. It should not be done if the only reason is to change the file processing modes. It has a reasonable chance of needing essentially a full rewrite of the program. In fact, I would start from that assumption.
 
Tom

 107,695 pts.