Working on a demo for developers who may not be aware of all the features endevor has to offer that could be leveraged to perhaps improve their productivity. I'm working on autogen. In the x years its been around I maybe touched it once.
So first let me ask if my little demo set up would exist in the real world:
COPYA used by PGM1 and PGM2
COPYB used by PGM2
PGM3 calls PGM1
PGM4 calls PGM2
PGM5 calls PGM4
PGM6 calls PGM1 and PGM2
ACMQ verifies said intertwined relationships:
1 DEMOCPYA COPYBOOK TTEST ENDADMIN S1 1
2 DEMOPGM1 COBOL TPROD ENDADMIN S1 2
2* DEMOPGM1 COBOL TTEST ENDADMIN S1 1
2 DEMOPGM2 COBOL TPROD ENDADMIN S1 2
2* DEMOPGM2 COBOL TTEST ENDADMIN S1 1
3* DEMOPGM3 COBOL TPROD ENDADMIN S1 2
3* DEMOPGM6 COBOL TPROD ENDADMIN S1 2
3* DEMOPGM4 COBOL TPROD ENDADMIN S1 2
3* DEMOPGM4 COBOL TTEST ENDADMIN S1 1
4* DEMOPGM5 COBOL TPROD ENDADMIN S1 2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 DEMOCPYB COPYBOOK TTEST ENDADMIN S1 1
2 DEMOPGM2 COBOL TPROD ENDADMIN S1 2
2* DEMOPGM2 COBOL TTEST ENDADMIN S1 1
3* DEMOPGM4 COBOL TPROD ENDADMIN S1 2
3* DEMOPGM4 COBOL TTEST ENDADMIN S1 1
3* DEMOPGM6 COBOL TPROD ENDADMIN S1 2
4* DEMOPGM5 COBOL TPROD ENDADMIN S1 2
Now the curious question comes into play when I generate both copybooks in the same batch job. I (mistakenly) assumed Endevor would analyze the relationships of both components and build the generate order accordingly, but alas, it does not.
If COPYB is generated first PGM2,4,6, and 5 are compiled in the order displayed above. However, since AUTOGEN wont generate the same using element twice, the generate of COPYA does not generate PGM6, which would (could?) result in a component validation error since PGM6's component list now contains PGM1's previous generate timestamp and not its current one.
C1G0340I OPTION AUTOGEN IN USE, ALL ACTIONS WILL BE RESOLVED BASED ON CURRENT INVENTORY CONTENTS
C1G0345I PROCESSING AUTOGEN FOR ELEMENT DEMOCPYB/COPYBOOK. TARGET IS TTEST/ENDADMIN/S1/1
C1G0343I ELEMENT DEMOPGM2 / COBOL / ENDADMIN / S1 WILL BE GENERATED
C1G0343I ELEMENT DEMOPGM4 / COBOL / ENDADMIN / S1 WILL BE GENERATED
C1G0343I ELEMENT DEMOPGM6 / COBOL / ENDADMIN / S1 WILL BE GENERATED
C1G0343I ELEMENT DEMOPGM5 / COBOL / ENDADMIN / S1 WILL BE GENERATED
C1G0345I PROCESSING AUTOGEN FOR ELEMENT DEMOCPYA/COPYBOOK. TARGET IS TTEST/ENDADMIN/S1/1
C1G0343I ELEMENT DEMOPGM1 / COBOL / ENDADMIN / S1 WILL BE GENERATED
C1G0343I ELEMENT DEMOPGM3 / COBOL / ENDADMIN / S1 WILL BE GENERATED
ADD DEMOCPYB
ADD DEMOCPYA
GEN-AUTO DEMOPGM2
GEN-AUTO DEMOPGM4
GEN-AUTO DEMOPGM6
GEN-AUTO DEMOPGM5
GEN-AUTO DEMOPGM1
Obviously, if I generate COPYA first, all 6 pgms are recompiled, and COPYB's autogen skips all of them.
OPTION AUTOGEN IN USE, ALL ACTIONS WILL BE RESOLVED BASED ON CURRENT INVENTORY CONTENTS
PROCESSING AUTOGEN FOR ELEMENT DEMOCPYA/COPYBOOK. TARGET IS TTEST/ENDADMIN/S1/1
ELEMENT DEMOPGM1 / COBOL / ENDADMIN / S1 WILL BE GENERATED
ELEMENT DEMOPGM2 / COBOL / ENDADMIN / S1 WILL BE GENERATED
ELEMENT DEMOPGM3 / COBOL / ENDADMIN / S1 WILL BE GENERATED
ELEMENT DEMOPGM6 / COBOL / ENDADMIN / S1 WILL BE GENERATED
ELEMENT DEMOPGM4 / COBOL / ENDADMIN / S1 WILL BE GENERATED
ELEMENT DEMOPGM5 / COBOL / ENDADMIN / S1 WILL BE GENERATED
PROCESSING AUTOGEN FOR ELEMENT DEMOCPYB/COPYBOOK. TARGET IS TTEST/ENDADMIN/S1/1
[insert crickets]
Does any of this make sense or is it safe to say, always run it in SIM mode to decide who you want to re-compile manually? (The majority of programs here use NODYNAM and/or static links).
Thanks for your opinions!
KT