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



OK, maybe I'm missing something obvious ... but I can't tell this routine won't compile ...

----------
dcl-proc getTypeId;

dcl-pi *n like(im_AttributeTypeID);
pTypeName like(im_AttributeTypeName) const;
end-pi;

dcl-s typeId like(im_AttributeTypeID);

exec sql
select ATID
into :typeId
from IMUATP
where UCASE(ATNAME) = UCASE(:pTypeName);

if sqlCode <> *zero;
typeId = *blank;
endif;

return typeId;
end-proc;
----------

I'm getting a SQL0312 complaining that TYPEID and PTYPENAME aren't defined or not usable.

The procedure compiles fine if TYPEID or PTYPENAME are either defined as char's or like fields in files.

Both im_AttributeTypeID & im_AttributeTypeName are defined in a copy book as 'template' character fields.

This is on 7.1 TR11

Any suggestions?

david


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.