|
Rick, In a message dated 97-04-21 22:40:38 EDT, you write: > Ok.. I tried the "LIKE" instead of PIC, but the SQL precompiler didn't > "like" it. > > I get the message "host variable is unusable or undefined". > > I commented out all the SQL stuff, and compiled it as a regular cobol > pgm, and it compiled just fine. > > Am I missing something? Is there any way to get the precompiler to > translate the like statements? or, as I suspect, I'm SOL. Ohhhhh, I missed the "SQL pre-compiler" statement before! I thought that this was native COBOL. SQL COBOL/400 WILL NOT stand for sub-defined fields and it sounds like you have some. In the following example: 01 ORDR-REC-A 02 ORDR-NBR PIC 9(9). 02 ORDR-NO REDEFINES ORDR-NBR. 03 ORDR-NBR6 PIC 9(6). 03 ORDR-REC-SEQ PIC 9(3). The "03" level fields CANNOT be used in SQL. This is an SQL/400 limitation, and not a COBOL limitation. We have the same limitation using data structures in RPG. Is this your problem? HTH, Dean Asmussen Enterprise Systems Consulting, Inc. Fuquay-Varina, NC USA E-Mail: DAsmussen@AOL.COM "A fanatic is one who can't change his mind and won't change the subject." -- Sir Winston Churchill * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This is the Midrange System Mailing List! To submit a new message, * * send your mail to "MIDRANGE-L@midrange.com". To unsubscribe from * * this list send email to MAJORDOMO@midrange.com and specify * * 'unsubscribe MIDRANGE-L' in the body of your message. Questions * * should be directed to the list owner / operator: david@midrange.com * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
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.