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



Joep,

Indeed that makes sense. The CONST keyword should cause the compile to
fail. However the compilation ended successful without errors ...

We're on V5R2M0



Johan Vangilbergen

YUSE
Phone : +32 16 74 50 80
Fax : +32 16 74 50 89
Email : jvg@xxxxxxx
Web : WWW.Yuse.be
Address : Bondgenotenlaan 138, B-3000 Leuven, Belgium

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
J.Beckeringh@xxxxxxxxxxxxxxxxxxxxxxxxxx
Sent: donderdag 5 april 2007 15:24
To: RPG programming on the AS400 / iSeries
Subject: Re:

Johan,

This should not compile: you specify Key1 and Key2 as CONST parameters,
yet you CLEAR them. If you compiled without the CONST in the procedure
interface, the compiler would have no problems with the CLEAR
statements,
but then you would get MCH3601 (Pointer not set ...) when calling with 3

parameters. Key2 is undefined, because you did not pass it.

Joep Beckeringh






"Johan Vangilbergen" <jvg@xxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
05-04-2007 15:19
Please respond to RPG programming on the AS400 / iSeries

To: "RPG programming on the AS400 / iSeries"
<rpg400-l@xxxxxxxxxxxx>
cc:
Fax to:
Subject:


I am puzzled !



I'm calling a subprocedure. This subprocedure has 4 parameters in its
procedure interface. Only the first is required, the three others have
the option *NOPASS.



D Patientadmit PI N

D Cazi Like(CaziDp) Const

D Date D Const Options(*Nopass)

D Key1 Like(Key1Dp) Const
Options(*Nopass)

D Key2 Like(Key2Dp) Const
Options(*Nopass)



D Datu S 8 0



/Free

If %Parms <= 2;

Clear Key1;

Clear Key2;

Endif;

If %Parms = 1;

Datu = %Int(%Char(%Date():*Iso0));

Else;

Datu = %Int(%Char(Date:*Iso0));

Endif ;



I'm calling this subprocedure in the following way :

C If PatientAdmit(CaziHo:%Date(DateHo:*Iso))

C ... Do some stuff

C EndIf



When I run this interactively, all goes well. However, if I run this in
batch, the procedure crashes on the "Clear Key2" statement, saying that
the pointer or location was not referenced.

What am I missing ?



Maybe, I have to say that the subprocedure is part of a service program
which is bound to the calling program.







Johan Vangilbergen



YUSE

Phone : +32 16 74 50 80

Fax : +32 16 74 50 89

Email : jvg@xxxxxxx <mailto:jvg@xxxxxxx>

Web : WWW.Yuse.be <http://www.Yuse.be>

Address : Bondgenotenlaan 138, B-3000 Leuven, Belgium




As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.