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



Hi Mike,

OPTIONS(*NOPASS) means you'll pass a character field with a fixed length.
The compiler does not check if the length of the passed field is identical
to the expected field length. This gives you the ability to pass character
fields that are shorter as the maximum length defined in the prototype.
If neither the keyword CONST nor the keyword VALUE are specified for the
parameter, you have to check the incomming length of the parameter in your
called procedure. If less bytes as expected are passed, you only can change
the incomming bytes, otherwise you'll override global memory!! To determine
the incomming length you have to add the keyword OPDESC to the Prototype and
use the API CEEDOD in the called procedure.

Varying means a field with varying length is passed.
A varying length field has 2 preceeding bytes that contain the actual length
of the field.
Because the length is implicitely passed with the parameter field, no
additional actions are needed in the called procedure.
If it is an input/output parameter you can change the length of data,
without overriding memory. The new length is also stored in these 2
preceeding bytes.

Even if I said, "field passed" only a pointer to the parameter field is
passed to the called procedure, as long the keyword VALUE is not specified.

I hope this helps

Birgitta

-----Ursprungliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]Im Auftrag von Mike Pantzopoulos -
(H/O)
Gesendet: Donnerstag, 6. Oktober 2005 03:57
An: RPG programming on the AS400 / iSeries
Betreff: RE: Prototype Definitions


Thanks.
It's been driving me crazy. They seem to be saying the same thing but
subtle differences are deadly in the arcane art of procedures. I'm sure
I'll be asking more before the end of today (In Australia).



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of JK
Sent: Thursday, 6 October 2005 11:53 AM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Prototype Definitions


Mike,

 The archives contain several excellent discussions on this. Search for
'varying varsize'. Omit the * preceding "*varying" and "*varsize"
because it just confuses the search engine.

http://archive.midrange.com/rpg400-l/

JK


> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
> On Behalf Of Mike Pantzopoulos - (H/O)
> Sent: Wednesday, October 05, 2005 8:36 PM
> To: rpg400-l@xxxxxxxxxxxx
> Subject: Prototype Definitions
>
> Could some kind soul please describe the difference between the
> following prototype definitions:
>
> *VARYING
> OPTIONS(*VARSIZE)
>
> Thanks heaps.
>
> Mike Pantzopoulos

--
This is the RPG programming on the AS400 / iSeries (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.

****************************************************************************
*****************************
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you are not the intended recipient, any use, disclosure or copying of
this message is unauthorised. If you have received this message in error,
please reply using the sender's email address.

This footnote confirms that this email message has been scanned for computer
viruses. EIG-Ansvar Limited does not accept liability for any loss or
damage, whether caused by our own negligence or not, that results from a
computer virus or defect in the transmission of this email or any attached
file.

EIG-Ansvar Limited - Australia (A.B.N. 21 007 216 506)
Email : insure@xxxxxxxxxxxxxxxx

Eig-Ansvar Limited - New Zealand
Email : insure@xxxxxxxxxxxxxxxx

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

--
This is the RPG programming on the AS400 / iSeries (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 ...

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.