What do you pass on the call? I didn't see that in the code. My first thought is that your parameter isn't defined. Just putting a parameter in a prototype (PR) line doesn't actually define it.
You need to have JbtPriceDS on it's own D-spec just as it is in the prototype.
Given what I see here when the program tries to execute the first eval it will abend because the data structure field is not defined.
Rick
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of THarteau@xxxxxxxxxxxxxxxxxx
Sent: Friday, March 05, 2010 9:30 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Service Program Pointers
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
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
Privileged and Confidential. This e-mail, and any attachments there to, is intended only for use by the addressee(s) named herein and may contain privileged or confidential information. If you have received this e-mail in error, please notify me immediately by a return e-mail and delete this e-mail. You are hereby notified that any dissemination, distribution or copying of this e-mail and/or any attachments thereto, is strictly prohibited.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.