×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




*** i uploaded my samples to midrange scratchpad, and pasted the generated link here ... but this seems futile.
*** Therefore i now include sample code here in text form. Sorry, i tried my best.


****** Getting code to list here somewhat readeable is a nuisance. 
****** I try once more, making sure i use plain text.
****** I would be thankful for working instructions to show code!



As described in a previous thread (which i do not replicate here) i have a problem with MONITORing for MCH3401 - "can not resolve to object".

I now have 2 sample programs, stripped down to the bone, to demonstrate this.


Sample 1: Monitoring for MCH3401 works
       //----------------------------------------------------------------------
       dcl-s  msg       char(50);
       dcl-s  pgmname   char(10)  inz('PGMXYZ');
       //----------------------------------------------------------------------
       // Test for MCH3401 - Can not resolve to object - OK
       //----------------------------------------------------------------------

       monitor;
     c                   call      'PGMABC'
     c*
     c                   eval      msg = 'Normal end'
     c     msg           dsply

       on-error *PROGRAM;
           msg = 'on-error *program. Status= ' + %char(%status());
           dsply msg;
       endmon;

       *inlr = *on;


Sample 2: Monitoring for MCH3401 works NOT

       //----------------------------------------------------------------------
       dcl-s  msg       char(50);
       dcl-s  pgmname   char(10)  inz('PGMXYZ');
       //----------------------------------------------------------------------
       // Test for MCH3401 - Can not resolve to object - NOT ok    
       //----------------------------------------------------------------------

       monitor;
         exsr srmain;

       on-error *PROGRAM;
           msg = 'on-error *program. Status= ' + %char(%status());
           dsply msg;
       endmon;

       *inlr = *on;
       //----------------------------------------------------------------------
     c*
     c     srmain        begsr
     c                   call      'PGMABC'
     c*
     c                   eval      msg = 'Normal end'
     c     msg           dsply
     c*
     c                   endsr 
       //----------------------------------------------------------------------





Slight difference: Sample2 uses EXSR, Sample1 does not.

Interestingly, other errors, eg. "MCH1210 - Decimal truncation"   ARE  handled by both samples.

Puzzling, isn't it?

Thanks for your ideas on this, cheers!
Martin Neugebauer



This thread ...

Follow-Ups:
Replies:

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

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