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



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


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.