× 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 Patrick,

Besides Jon's "but MOVE ? ", unless you need the variables PW_SIZE and PW_FLAGS elsewhere, and since you specified VALUE on the parms, you could eliminate the MOVEs entirely and just have

C CALLP PW_RAND ( PW_BUF : 64 : 3 )

--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx <mailto:petercdow@xxxxxxxxx>
pdow@xxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxx> /


DPW_BUF S 70A
DPW_SIZE S 10I 0
DPW_FLAGS S 10I 0
*
DPW_RAND PR EXTPROC('pw_rand')
D PW_BUF 70A
D PW_SIZE 10I 0 VALUE
D PW_FLAGS 10I 0 VALUE
*----------------
C MOVE 64 PW_SIZE
C MOVE 3 PW_FLAGS
C CALLP PW_RAND ( PW_BUF : PW_SIZE : PW_FLAGS )

( I hope, my MUA will not mess up with the formatting.)

Compiles and links fine, but when I try to run the call, the application crashes with MCH 3601 (Pointer not set for location referenced.). I read some articles in the net about it but I can't find out where or what I do wrong.

Debug:

PW_BUF CHAR(70) ' '
VALUE IN HEX '40404040404040404040404040404040404040404040404040404040404040404040404040404040'X
41 '404040404040404040404040404040404040404040404040404040404040'X
PW_FLAGS ZONED(1,0) 3. 'F3'X
PW_SIZE ZONED(2,0) 64. 'F6F4'X

Help greatly appreciated! Please refrain from "do it with RPG free", because I don't want to open yet another task on my already big stack. (Learning free is on my list, for a later point in time.)

:wq! PoC

PGP-Key: DDD3 4ABF 6413 38DE - https://www.pocnet.net/poc-key.asc

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com


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.