× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hey all

Something interesting happened to me today.  I was trying to get a better
handle on Data Structures and parameters in ILE RPG, and I've cause the
compiler to abend in the most deeelightful way.  Here's the code:

h nomain

d MAX_MSG         c                   200

d dsFuncPr_t      ds
d  count                         5p 0
d  array                        10a   dim(MAX_MSG)

dfunc             pr            10a   likeds(dsFuncPr_t)

pfunc             b                   export

dfunc             pi                  likeds(dsFuncPr_t)

d dsFuncPi        ds                  likeds(dsFuncPr_t)

 /Free

  // Initialize last element used
  count = 100;

  // Initialize some array values
  array( 1 ) = 'Blah, Blah';
  array( 10 ) = 'Woof, Woof';
  array( 100 ) = 'I am not a spud';

  return dsFuncPi;

 /End-Free

pfunc             e

--------------
The idea is that the function func() returns a structure, containing two
values:  the packed field count and the array array.  I suspect there's a
superior way of doing this, but I have no idea what that might be.

Anyway, I compile the module as follows:

CRTRPGMOD MODULE(TESTMODULE)
          SRCFILE(QRPGLESRC)
          DBGVIEW(*NONE)
          TGTRLS(V5R1M0)

And everything is OK.  However, if I need to run the debugger, I need to
recompile.

When I change the compile command to:

CRTRPGMOD MODULE(TESTMODULE)
          SRCFILE(QRPGLESRC)
          DBGVIEW(*NONE)
          TGTRLS(V5R1M0)

The following happens:
1.  The compiler begins churning
2.  A flurry of status query messages appear on line 24 of the display,
with the messages:
  Query running.
 Query running.  Creating copy of file *N in *N
    (note:  this message flies by very quickly; probably not verbatim)
 Query running.  1 records selected.
3.  The status messages disappear, and the compilation ends with the
message
  Compilation failed. Module TESTMODULE not created...

> crtrpgmod module(testmodule) srcfile(qrpglesrc) dbgview(*all)
tgtrls(V5r1m0)
  Pointer not set for location referenced.
  File QWXDUMP created in library QTEMP.
  Member QWXDUMP added to file QWXDUMP in QTEMP.
  File QWXDUMP in library QTEMP changed.
  An error occurred during translation.
  Problem log updated.
  Output queue QSCAPAROQ in QSC9612752 already exists.
  Compilation failed. Module TESTMODULE not created...

Looking at the compile listing, the code is syntactically correct, and
there are no RNFxxxx error messages.  However, the following appears at the
end of the compile listing:

          * * * * *   E N D   O F   F I N A L   S U M M A R Y   * * * * *
                  C o d e   G e n e r a t i o n   M e s s a g e s
 Error creating source debugger information.
 An error occurred during translation.
  * * * * *   E N D   O F   C O D E   G E N E R A T I O N   M E S S A G E S
* * * * *

I took a closer look at the joblog messages, and the MCH3601 has the
following detail info:

                            Display Message Details
 Message ID . . . . . . :   MCH3601       Severity . . . . . . . :   40
 Date sent  . . . . . . :   10/24/02      Time sent  . . . . . . :
15:35:20
 Message type . . . . . :   Escape
 CCSID  . . . . . . . . :   65535
 From program . . . . . . . . . :   QTESYMS
   From library . . . . . . . . :     QSYS
   From module  . . . . . . . . :     TESYSPI
   From procedure . . . . . . . :     _TE_Add_Array_Type
   From statement . . . . . . . :     27
 To program . . . . . . . . . . :   QTESYMS
   To library . . . . . . . . . :     QSYS
   To module  . . . . . . . . . :     TESYSPI
   To procedure . . . . . . . . :     _TE_Add_Array_Type
   To statement . . . . . . . . :     27
The QWXDUMP file has a lot of binary data, don't know how to read that.

The message "An error occurred in translation." has secondary level and
help text of:

Message ID . . . . . . :   CWX9001       Severity . . . . . . . :   40
Message type . . . . . :   Escape
Date sent  . . . . . . :   10/24/02      Time sent  . . . . . . :
16:19:17
Message . . . . :   An error occurred during translation.
Cause . . . . . :   An irrecoverable error has occurred during translation.
  The reason code is 0001.  See the previous messages listed in the joblog.
Recovery  . . . :   This error indicates that an internal compiler error
has
  occurred. Contact your service representative.

And has message details of:

Message ID . . . . . . :   CWX9001       Severity . . . . . . . :   40
Date sent  . . . . . . :   10/24/02      Time sent  . . . . . . :
16:19:17
Message type . . . . . :   Escape
CCSID  . . . . . . . . :   65535
>From program . . . . . . . . . :   QWXCRTMD
  From library . . . . . . . . :     QSYS
  From module  . . . . . . . . :     QWXCMSG
  From procedure . . . . . . . :     send_message
  From statement . . . . . . . :     29
To program . . . . . . . . . . :   QRN4CPP
  To library . . . . . . . . . :     QDEVTOOLS
  To module  . . . . . . . . . :     GRP4CPP
  To procedure . . . . . . . . :     main
  To statement . . . . . . . . :     588

Anyone run across this one before?

Thanks!

-Doc

-----------------------------------------
Ed Doxtator, Analyst
Baxter International Healthcare
1435 Lake Cook Road, LC II-3
Deerfield, IL  60015
Voice: 847-940-5680




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-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.