Want to freak out the v5r4 CL compiler?  Try coding this
 START:      PGM
    SAVLIB     LIB( +
                   PVCPROD    /* Operations library */ +
                  ) +
               DEV(TAP01) ENDOPT(*LEAVE) +
               SAVFDTA(*NO) OUTPUT(*PRINT) +
               ACCPTH(*YES) +
             /* Daily library backup */
    MONMSG     MSGID(PVC0001)  EXEC(DO)
    /*Let's start out with no 'real' message being monitored.  After all, 
+
      do we really want to skip the usual "some libraries not saved" or, +
      "some objects not saved"?  If we get some libraries not saved, 
perhaps +
      we should remove them from the backup.  If we get some objects not 
saved +
      perhaps we should better handle the locks, or do a second SAVLIB and 
put +
      that library in there as to not confuse the message with libraries 
that +
      we want a 100% save of.*/
      CALLSUBR BADLIBSAVE
    ENDDO

ENDPGM
SUBR BADLIBSAVE
  /* test */
ENDSUBR


Instead of
 START:      PGM
    SAVLIB     LIB( +
                   PVCPROD    /* Operations library */ +
                  ) +
               DEV(TAP01) ENDOPT(*LEAVE) +
               SAVFDTA(*NO) OUTPUT(*PRINT) +
               ACCPTH(*YES) +
             /* Daily library backup */
    MONMSG     MSGID(PVC0001)  EXEC(DO)
    /*Let's start out with no 'real' message being monitored.  After all, 
+
      do we really want to skip the usual "some libraries not saved" or, +
      "some objects not saved"?  If we get some libraries not saved, 
perhaps +
      we should remove them from the backup.  If we get some objects not 
saved +
      perhaps we should better handle the locks, or do a second SAVLIB and 
put +
      that library in there as to not confuse the message with libraries 
that +
      we want a 100% save of.*/
      CALLSUBR BADLIBSAVE
    ENDDO

return
SUBR BADLIBSAVE
  /* test */
ENDSUBR
ENDPGM

Ok, I can accept some errors.  But not 

 CPF0808 Error in compiler-created code. 
Compiler ended abnormally. See message 'CPF0808'.

Then I look at the joblog to find
CPF6301-Intermediate representation of program (IRP) contains 6 errors. 
Probable compiler error.
CPF0808-The code created by the compiler has an error. This may be a 
compiler error.

I take it that the CL compiler simply ignores EVERYTHING after ENDPGM. 
Interesting.  Ok if that is true, how's about just listing BADLIBSAVE as 
undefined, like what happens with the classical
GOTO HE!!
with no HE!! label.
 Defined Labels 
 Label            Defined     References 
 HE!!             ******        2700 
* CPD0715 30  Label 'HE!!      ' does not exist.


Or, better yet, I create an EXTRA subroutine that is not called and I get
 Defined Subroutines 
 Subroutine       Defined     References 
 BADBUBBA           2800 
* CPD0313 10  Subroutine BADBUBBA defined but not called.
 BADLIBSAVE         2703        2500 
So stick the undefined subroutines here.

Opened up a pmr with IBM (15178,500).  We'll see what happens


Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.