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



Adrian,

MODASA is used to allocate automatic storage much like using alloca() in C.
The received parm would already have it's storage allocated prior to calling
your program.  If you need to make a copy of the parm, then MODASA could be
used.

Copying variable length data can done using the qualifiers of
(startpos:length). For example:
CPYBLA   SOMEVAR(1:PARM2),  PARM1(1:PARM2);

A code example describing what you mean by "handle" might help.



----- Original Message ----- 
From: "Adrian Oprea" <aoprea@xxxxxxxxxxxxx>
To: "MI Programming on the AS400 / iSeries" <mi400@xxxxxxxxxxxx>
Sent: Thursday, December 04, 2003 11:41 AM
Subject: [MI400] Variable length parameter


Hi guys,
here's my question : how do I handle a variable length parameter in a MI
program provided I receive its length as parameter as well.
I tried using the MODASA instruction but I don't seem to find the way of
geting it work.
The program should receive in the 1st parm a variable length buffer and the
second would be the length of the first.

Thanks,
Adrian
_______________________________________________
This is the MI Programming on the AS400 / iSeries (MI400) mailing list
To post a message email: MI400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/mi400
or email: MI400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/mi400.


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.