Api usage

0 pts.
Tags:
Application development
AS/400
RPGLE
Hi! Any one that knows where (in which library) to find the CEERARN0 api? The crtpgm command can't find the module. Best regards! //MikEhr
ASKED: September 26, 2006  7:20 AM
UPDATED: September 26, 2006  8:03 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi

Do you mean CEERAN0 (Random Number Generator)?

If so, CEERAN0 is a procedure that is available as part of an ILE service program that is automatically bound to your program by the compiler. You don’t need to bind it specifically to your program.

Do a DSPPGM or DSPSRVPGM on your program/service program and you should find a number of system service programs bound in, such as QRNXIE, QLEAWI, etc. One of these will contain the CEERAN0 procedure.

A prototype for calling the API from RPG is:

*—————————————————–
* Generate a Random Number API
*—————————————————–

D CeeRan0 pr ExtProc(‘CEERAN0′)
D iSeed 10i 0
D iRandomNo 8f
D iFailCode 12a Options(*Omit)

All the best

Jonathan

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following