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



Another thing that can be done is to change the command processor for a system command, with one very long variable. Then look at the parameters you think you will get - there can be hidden (constant) parameters, and the order is not necessarily that seen in a prompt. There can also be those special values, like -1 for *ALL. But everything will be there.

Vern

At 06:29 PM 2/19/2003 +0100, you wrote:
Why?

Passing 'ABC blank blank blank blank blank blank blank blank blank blank blank . . . *' is not better than pasing
'ABC blank blank blank blank blank blank blank blank blank blank blank . . .' without the unused '*'.
Of cause _coding_ for that '*' forces you to be sure that it's on the 101'st position but it's easier _not_ to code for this.



Another thing:
It was said previously in this thread that the padded bytes were 'unpredictable', and this is probably also what the manual tells. My experience is however that it _can_ be predicted (there might be an exception if you pass a parameter _from_ a program that is already an entry parameter _to_ the same program): All parameters are placed in a single consequtive string somewhere in the P.A.G. In case they are alphameric literals shorter than 64 (CALL pgm PARM('abc')) the parameter occupies 64 bytes while numeric literals occupies 8 bytes (packed 15.5). All non-litterals occupies only the minimum numbers of bytes that they need. Then, all the CALL command does is to pass _pointers_ to somewhere in this string. Is this useful? Yes, you can use it to hack the parameter interface in program that you have no source for. For example replace a QSYS program (temporary!!!) whith this program of your own:
PGM PARM(&P1 &P2 ... &Pn)
DCL &P1 *CHAR 256
DCL &P2 *CHAR 256
.
.
DCL &Pn *CHAR 256
DMPCLPGM
ENDPGM
You'll see that &P2 is the same as &P1, except that first n bytes from &P1 are cut off from &P2. Then you know that first parameter has the length of n bytes.


Henrik
www.hkrebs.dk



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.