I'm new to the world of procedures. I am in the process of learning to develop procedures on the Iseries and have run into the following problem:
I am developing a procedure that takes an alphanumeric field and converts it to numeric. My problem is that I defined the local variable in the procedure
yet the compile crashes because it says it can't find the object. The code in question is below:
d GetPostDate pr like(postdate)
d org1 like(emporgun1) value
GetPostDate b
GetPostDate pi like(postdate)
Org1 like(emporgun1) value
ReturnValue s like(postdate)
OrgComp# s 4 0
free
// Convert the company# from character to numeric for the SQL exec command.
OrgComp# = %dec(Org1:4:0);
// Retrieve the record from DBIFGLS for the company being processed.
exec sql select * into :ds_dbifgls from dbifgls where DGLSCMPNY =
OrgComp#;
This mailing list archive is Copyright 1997-2026 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.