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



It's because you are using a basing data structure on a pointer. That
points the data structure to a specific spot in memory. The pointer is
not set, so it's null which makes your data structure null.

The solution would be to remove the Based(JbtInfoPtr). In your short
snippet here, there appears to be no need to use a pointer.
--
James R. Perkins



On Fri, Mar 5, 2010 at 07:30, <THarteau@xxxxxxxxxxxxxxxxxx> wrote:
Hi,

I did a service program a few years ago and I trying to do anther. Most of
the stuff is copied from the working one. When I call the program, I am
getting the errors:
       Pointer not set for location referenced.
       Function check. MCH3601 unmonitored by SRVJBT at statement
0000004100, instruction X'0000'.
       The call to JBTPRICE ended in error (C G D F).

JBTPRICE is the module & SRVJBT is the service program.  This is from the
compiled JBTPRICE. I used a copy to get the prototype in the program. It
is the only place I use a pointer:
        *COPY QPROSRC,PROJBT
       D JbtPrice        PR              N
       D  JbtPriceDS                         LikeDS(JbtInfo)

       D JbtInfo         DS                  Based(JbtInfoPtr)
       D  JobIn                         6  0
       D  ItemIn                       15
       D  DateIn                        8  0
       D  PrcOut                       15  5

       D*JbtInfoPtr      S               *   Inz(%Addr(JbtInfo))
In my program that uses the service program, I copy in the same prototype
and have this to get the price back:
       C                   Eval      JbtPriceDS.DateIn = ShipDt
       C                   Eval      JbtPriceDS.ItemIn = Item
       C                   Eval      JbtPriceDS.JobIn = JLJBT#
       C                   Eval      JbtPriceDS.PrcOut = 0
       C                   Eval      RtnInd = JbtPrice(JbtPriceDS)
       C                   Eval      WrkPrc = JbtPriceDS.PrcOut

These are the values according to the dump:
       JBTINFO               DS
               DATEIN              ZONED(8,0)           NOT ADDRESSABLE
               ITEMIN              CHAR(15)             NOT ADDRESSABLE
               JOBIN               ZONED(6,0)           NOT ADDRESSABLE
               PRCOUT              ZONED(15,5)          NOT ADDRESSABLE
       JBTINFOPTR            POINTER              SPP:*NULL
       JBTPRICEDS            DS
                 DATEIN              ZONED(8,0)           20100331.
'F2F0F1F0F0F3F3F1'X
                 ITEMIN              CHAR(15)             'A01B6360 '
                          VALUE IN HEX 'C1F0F1C2F6F3F6F040404040404040'X

                 JOBIN               ZONED(6,0)           006982.
'F0F0F6F9F8F2'X
                 PRCOUT              ZONED(15,5) 0000000000.00000

I guess I don't know enough about pointers to see anything to point me in
the right direction. Can anyone tell me what my problem is? Thanks!

<===================================================>

Terri Harteau
Felker Brothers Corporation
****************
"Do not follow where the path may lead. Go instead where there is no path
and leave a trail."
Ralph Waldo Emerson

****************



--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

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