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



You have this:

If %Parms <= 2;
Clear Key1;
Clear Key2;
Endif;

Which is clearly wrong.

You should have this:

If %Parms >= 3;
Clear Key1;
If %Parms >= 4
Clear Key2;
Endif;
Endif;

-Bob Cozzi
www.i5PodCast.com
Ask your manager to watch i5 TV


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On
Behalf Of Johan Vangilbergen
Sent: Thursday, April 05, 2007 8:19 AM
To: RPG programming on the AS400 / iSeries
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.