|
At 08:34 05/12/1999 , Douglas Handy wrote: >I actually had a programmer come to me in 1980 while he was writting a >S/34 WORKSTN program (hist first, BTW). He was excited, because he >had discovered he could use H1-H9 if he set them off before the end of >the cycle (yup, it did use the cycle). He had already used 01-99, >L1-L9 (albeit not for control breaks -- just indicators), and now also >H1-H9. He also asked why he couldn't use M1-M9, because he thought he >still needed more indicators... I think I worked on that program. Actually, you can do far better than that. If you build a subroutine that compares each indicator and moves a '1' or '0' to a data structure subfield for each indicator, you can have unlimited SETS of indicators. The possibilities are endless. That way, you can move one set to another with a SINGLE MOVE! You do have to remember to restore the correct set at the bottom of the calcs though, or the detail output conditioning indicators may not be set correctly. It works well if you divide the program into multiple parts and use a different set in each part. For instance, the main line and subroutines S0000 through S4999 can use set 1, and S5000-S9999 can use set 2. You might also use odd-even subroutine numbers to determine the set, or you could DIV by the number of sets and MVR to determine the set number. You could even pass the number of sets to use in with the LDA or a SPECIAL device file if you wanted to get fancy!! I'll bet you could even use a table file to save them at the end of the program. Who says you can't have object persistence with RPG!!!! Pete Hall pbhall@execpc.com http://www.execpc.com/~pbhall +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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.