• Subject: Problems accessing the PODATA file from RPG
  • From: "Shrader, Patrick" <pshrader@xxxxxxxx>
  • Date: Mon, 16 Oct 2000 12:49:17 -0400

I am having quite a time accessing information from PODATA. After reading
every internet site I could find on multi-format files, I still cannot get
the right commands in order to properly access this file. Since many of you
are familiar with both MAPICS and RPG, I thought I would hit you up for an
idea or two.

What I am ultimately trying to do is to access all of my purchase order
information (header, detail, blankets, etc) at once using MAPICS' PODATA
file, creating an open PO file for internally written programs. My report
program compiles and runs, but it shows blanks for each field value. So, I
simplified my problem by creating the following 9 line programs, (the /copy
is for compiler options), but all the programs returned the same results.

Using Debug, I determined that the program cycles through the records,
apparently reading data. Eventually the *in99 is set on, and the program
exits. However, when I eval any field after the read, the value comes back
as all blanks.

When I examine the file with Query, it shows data. What am I doing wrong in
my RPG program that prevents me from using my information? Is anyone willing
to share some sample code using this file for me? Obviously I am new to
files created with multi-record formats, but my search of IBM manuals and
web sites have not helped my meager little brain.

Thanks in advance for your help.

Patrick Shrader
White Knight Engineered Products


 <<podata.PDF>> 

0001.00 h/copy wkeplib/pgmsrc,#option

0002.00 Fpodata    if   e           k disk

0003.00 C     *loval        setll     podata

0004.00 C                   read      podata
99 
0005.00 C                   dow       (*in99 = *off)

0006.00 C                   read      podata
99 
0007.00 C                   enddo

0008.00 C                   eval      *inlr = *on

0009.00 C                   return


0001.00 h/copy wkeplib/pgmsrc,#option

0002.00 Fpodata    if   e           k disk

0003.00 C     *loval        setll     poitemda

0004.00 C                   read      poitemda
99 
0005.00 C                   dow       (*in99 = *off)

0006.00 C                   read      poitemda
99 
0007.00 C                   enddo

0008.00 C                   eval      *inlr = *on

0009.00 C                   return


0001.00 h/copy wkeplib/pgmsrc,#option

0002.00 Fpodata    if   e           k disk

0003.00 C     *loval        setll     poblktdb

0004.00 C                   read      poblktdb
99 
0005.00 C                   dow       (*in99 = *off)

0006.00 C                   read      poblktdb
99 
0007.00 C                   enddo

0008.00 C                   eval      *inlr = *on

0009.00 C                   return




podata.PDF


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.