|
The good thing about your prototype, is that you're smart enough to avoid
using the "B" data type. Good job with that!
You should quote the program name in EXTPGM('QUSCRTUS').
Also, upper/lower case parm identifiers is easier to read than all upper
case.
Last, and to your specific question... Sadly there is no way to specify a
default value for a parameter.
I have many APIs already prototypes and available in source code format at
www.rpgiv.com/downloads.
Click on a file name, then a member list appears, and you can retrieve any
of the source I've posted. Note that prototypes on this system are always
stored in the QCPYSRC ("Q Copy Source") source file.
-Bob Cozzi
www.RPGxTools.com
RPG xTools - Enjoy programming again.
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Mark Adkins
Sent: Friday, January 06, 2006 9:48 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Properly prototyping QUSCRTUS Create User Space
Is this the absolute best way to prototype the create user space API? Can
you specify defaults in the prototype like with an INZ?
DCREATEUSRSPC PR EXTPGM(QUSCRTUS)
D USRSPCNAME 20 CONST
D EXTENDEDATTR 10 CONST
D INITIALSIZE 10I 0 CONST
D INITIALVALUE 1 CONST
D PUBLICAUTH 10 CONST
D DESCRIPTION 50 CONST
D REPLACEUSRSPC 10 CONST OPTIONS(*NOPASS:*OMIT)
D ERRORCODE 32767 OPTIONS(*NOPASS:*OMIT:*VARSIZE)
D DOMAIN 10 CONST OPTIONS(*NOPASS:*OMIT)
D TRANSSIZEREQ 10I 0 CONST OPTIONS(*NOPASS:*OMIT)
D OPTIMIZEALIGN 1 CONST OPTIONS(*NOPASS:*OMIT)
********************************************************************
D ERRORCODE DS QUALIFIED
D BYTESPROVID 10I 0 INZ(%SIZE(ERRORCODE))
D BYTESAVAIL 10I 0 INZ(0)
D MSGID 7A
D RESERVED 1A
D MSGDATA 240A
Mark
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.