With proceedures I read that recursive calls are allowed. No time to get into proceedures.
clp calls, pgm1.
pgm1 add function displays scrn2, then calls pgm2, pgm2 calls pgm3, pgm3 calls pgm4.
pgm1 update function calls pgm4.
Issue is that pgm4 can call pgm1, pgm2, pgm3, pgm5, pgm6. On the call to pgm1 a recursive call occurs resulting in RNX8888.
to all programs, to no avail.
My thoughts on this are: since all parms used between the programs are loaded to the *LDA, end the RPG's with LR = *on and return to the clp. Let the CLP rtvdtaara *lda and sort out which program to go to next. Flds in the LDA are;
D LDA_DS UDS dtaara(*LDA) D LDACNUM 1 9 0 Claim number D LDAMODE 10 18 Mode D LDARTNIND 19 20 0 Return Indicator D LDACUST 21 28 0 Customer/Location # D LDACODE 31 38 0 Plumber Code D LDADETLN 39 41 0 Detl/DetD line # D LDASEQ# 43 45 0 DetD Sequence #
I could easily add caller and called pgm to the lda.
What are your thoughts on getting around this? Is there a quicker way?
The better way may be to use proceedures. Iam not sure about what all would have to be changed. I have never used them, now is when I don't have the time to learn it.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!