Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No value in dumped file

Status
Not open for further replies.

jadec

MIS
Jan 22, 2004
87
US
Hi Guys,

I have a rpgle program run in an error. I dumped it. The program read thru. a database file. When I looked at the dumped file qppgmdmp, the fields from the database file, only those have been used in my program have value, other fields are all zero or blank. What did I do wrong? Anyone can help? Thanks

 
we cannot know what's going wrong if you don't tell why the program bombs. So paste the CPF messages and your program here.
 
jadec,

Fields that are not referanced in your program cannot be displayed (depending on compile options). This is true in DEBUG as well. If you want to see the fields you must make some referance to the field, even if you just equate the field to itself.

HTH,
MdghntPgmr
 
Hi MdnghtPgmr and Talkturkey,

I wrote a test program to make it blow up in purpose.
I just tried to compile the program with *ALL in parameter Debugging view. But still get no value. What should I do to make reference to those fields?

Here is my program (short)
Code:
 100       *********************************************************************                                     02/10/95
    101      H DFTACTGRP(*NO)                                                                                           03/17/05
    102      H OPTION(*SRCSTMT : *DEBUGIO)                                                                              03/18/05
    103      H THREAD(*SERIALIZE)                                                                                       03/17/05
    105      H BNDDIR('DIRILE')                                                                                         03/18/05
    107      Ftkl031ui  if   e           k disk    usropn                                                               03/18/05
    108                                                                                                                 03/18/05
    109      D pgmname         PR                  extpgm('xxx')                                                        03/18/05
    113                                                                                                                 03/18/05
    114      d                 ds                                                                                       03/18/05
    115      drlsdate                  1      8  0                                                                      03/18/05
    116      d tkrelc                  1      2  0                                                                      03/18/05
    117      d tkrely                  3      4  0                                                                      03/18/05
    118      d tkrelm                  5      6  0                                                                      03/18/05
    119      d tkreld                  7      8  0                                                                      03/18/05
    120                                                                                                                 03/18/05
    121      d                 ds                                                                                       03/18/05
    122      d zfmdate                 1      8  0                                                                      03/18/05
    123      d   fmcc                  1      2  0                                                                      03/18/05
    124      d   fmyy                  3      4  0                                                                      03/18/05
    125      d   fmmm                  5      6  0                                                                      03/18/05
    126      d   fmdd                  7      8  0                                                                      03/18/05
    127                                                                                                                 03/18/05
    128      d todate          s              8                                                                         03/18/05
    129      d zcucd           s              6                                                                         03/18/05
    131                                                                                                                 03/18/05
    132      c     fmkey         klist                                                                                  03/18/05
    133      c                   kfld                    fmcc                                                           03/18/05
    134      c                   kfld                    fmyy                                                           03/18/05
    135      c                   kfld                    fmmm                                                           03/18/05
    136      c                   kfld                    fmdd                                                           03/18/05
   4045       /free                                                                                                     08/31/04
   4046            zfmdate = 20050301;                                                                                  03/18/05
   4047            todate  = '20050309';                                                                                03/18/05
   4048            zcucd = '527640';                                                                                    03/18/05
   4050            open tkl031ui;                                                                                       03/18/05
   4051                                                                                                                 03/18/05
   4052            setll fmkey tkl031ui;                                                                                03/18/05
   4053            dow not %eof();                                                                                      03/18/05
   4055            read tkl031ui;                                                                                       03/18/05
   4056                                                                                                                 03/18/05
   4057            if %eof();                                                                                           03/18/05
   4058            leave;                                                                                               03/18/05
   4059            endif;                                                                                               03/18/05
   4060                                                                                                                 03/18/05
   4061            if rlsdate > %int(todate);                                                                           03/18/05
   4062            leave;                                                                                               03/18/05
   4063            endif;                                                                                               03/18/05
   4068                                                                                                                 03/18/05
   4069            if tkclcd <> zcucd;                                                                                  03/21/05
   4070            iter;                                                                                                03/18/05
   4071            endif;                                                                                               03/18/05
   4072                                                                                                                 03/21/05
   4073            if tkfile = 10303;                                                                                   03/18/05
   4074            callp pgmname();     // [b]here make program blow up[/b]                                                    03/21/05
   4075            endif;                                                                                               03/18/05
   4076                                                                                                                 03/18/05
   4077            enddo;                                                                                               03/17/05
   4078            close tkl031ui;                                                                                      03/18/05
   4079                                                                                                                 03/18/05
   4080        *inlr= *on;                                                                                              08/31/04
   4081       /end-free                                                                                                 08/31/04
   4401       *                                                                                                         09/25/03

What can I do to see all the fileds value in program dump?

Thanks!
 
jadec,

Let's say you have a file with fields FIELDA, FIELDB and FIELDC. And these three fields are not being referanced. Simply do the following:

Code:
FIELDA = FIELDA;
FIELDB = FIELDB;
FIELDC = FIELDC;

HTH,
MdngthPgmr
 
Change H spec for:


H dftactgrp( *no ) actgrp( *new )
H option( *srcstmt: *nodebugio )
H bnddir( 'DIRILE' )


and add the DUMP(A) opcode as shown under.

Tell us what's going on and what you get in program dump for zfmdate, todate and zcucd fields ?

/free
zfmdate = 20050301;
todate = '20050309';
zcucd = '527640';
DUMP(A);
...

Replace also
callp pgmname() + prototype;
by DUMP(A);

hth
 
Hi Talkturkey,

I changed the program as your suggestion. I got correct value in fields : zfmdate, todate and zcucd . But I still didn't get value for those fields that not used in program.
May be I need to do what MdngthPgmr posted??

Thank you !
Jade




 
The setll is misplaced. Check also whether the date 20050301 exists in tkl031ui.

Do like the following and if you don't immediately reach the End Of File you should get the values you're expecting in your fields :
Code:
/free
  zfmdate = 20050301;
  todate  = '20050309';
  zcucd = '527640';
  [COLOR=red]setll fmkey tkl031ui;
  read tkl031ui;
  dow not %eof(); [/color]
  if rlsdate > %int(todate);  // ?
     leave;
  endif; 
  [COLOR=red]if tkclcd = zcucd;
    if tkfile = 10303;
       dump(a);     // the program dumps and goes on 
    endif; 
  endif;
  read tkl031ui;[/color]
  enddo;
  close tkl031ui;
  *inlr= *on;
/end-free
 
I note that the program is blowing up on the call to another program.

Does the program in the Extpgm prarameter of the Pgmname prototype exist in your library list? You have to have the name in upper case, and in quotes.

Also, does the called program require any parameters?

Me transmitte sursum, Caledoni!

 
flapeyre,
It's been done on purpose to make the calling program fall over and get the program dump.
 
Hi Talkturkey,

I tried the way you showed me. Still same thing. I guess this is IBM program bug.

Thanks

Jade
 
This is not a bug, it's normal. As MdnghtPgmr said, you have to reference the fields, that is use explicitly the fields in your program to see their contents in the program dump.

If you just equate the field to itself, f.e. :
tkclcd = tkclcd;
you'll be able to see the tkclcd content in the dump.
 
jadec,

Sure, that's what we're here for. Maybe one day you'll have some help for one of us. What goes around, comes around. ;-)

MdnghtPgmr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top