|
The following:
P*--------------------------------------
P* Procedure name: GetTPTLIB
P* Purpose:
P* Returns: Library name or *NONE
P* Parameter: PartnerType => Trading partner type
P*--------------------------------------
P GetTPTLIB B EXPORT
D GetTPTLIB PI 10A
D PartnerType 3a CONST
D* Local fields
D vGETTPTLIB S 10A inz(*loval)
C/exec sql
C+ Select tptlib into :vGETTPTLIB
C+ from eis/tptype
C+ where tpttype=:PartnerType
C/end-exec
/free
return vGETTPTLIB;
/end-free
P GetTPTLIB E
Results in:
010899020228 10899 02/28/02 173 C/end-exec
MSG ID SEV RECORD TEXT
SQL0312 30 172 Position 24 Variable PARTNERTYPE not defined or not
usable.
I am past the end of my rope with this &^%$ing precompiler!
Or am I missing something obvious?
But this works:
P*--------------------------------------
P* Procedure name: GetTPTLIB
P* Purpose:
P* Returns: Library name or *NONE
P* Parameter: PartnerType => Trading partner type
P*--------------------------------------
P GetTPTLIB B EXPORT
D GetTPTLIB PI 10A
D PartnerType 3a CONST
D* Local fields
D vGETTPTLIB S 10A inz(*loval)
D sqlPartnerType s 3a
/free
sqlPartnerType=PartnerType;
/end-free
C/exec sql
C+ Select tptlib into :vGETTPTLIB
C+ from eis/tptype
C+ where tpttype=:sqlPartnerType
C/end-exec
/free
return vGETTPTLIB;
/end-free
P GetTPTLIB E
Based on this information, I would say that the Precompiler doesn't support
the use of procedure parameter variables.
Rob Berendt
--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
Benjamin Franklin
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.