|
I have issues with the precompiler not handling the null indicator very well. 1. It won't let me use LIKE for the null indicator array map: D NULL s 5i 0 D* Null map for retrieved variables - fails because of LIKE DRtnNullMap ds occurs(10) D NullMap dim(9) like(NULL) C/EXEC SQL C+ FETCH NEXT FROM DYNFIL FOR 10 ROWS C+ INTO :RtnData :RtnNullMap C/END-EXEC This fails with SQL0080 Position 30 Indicator variable RTNNULLMAP not SMALLINT type 2. It won't let me use a set of named fields instead of an array for the null indicator map: D* Null map for retrieved variables - fails because it is not an array DRtnNullInd ds occurs(10) D TblLibNullI 5i 0 D TblNameNullI 5i 0 D TblTypeNullI 5i 0 D TblTextNullI 5i 0 D ColNameNullI 5i 0 D ColTypeNullI 5i 0 D ColLenNullI 5i 0 D ColScaleNullI 5i 0 D ColTextNullI 5i 0 This fails withSQL5011 Host structure array RTNNULLIND not defined or not usable, despite the fact that the memory layout is the same as the array. This either forces me into referring to the ordinal number of the columns as in NullMap(9) or defining another data structure that I can move the array into: DRtnNullNamed ds D TblLibNull like(NULL) D TblNameNull like(NULL) D TblTypeNull like(NULL) D TblTextNull like(NULL) D ColNameNull like(NULL) D ColTypeNull like(NULL) D ColLenNull like(NULL) D ColScaleNull like(NULL) D ColTextNull like(NULL) C 1 Do SQLER3 OccurNum 5 0 C OccurNum Occur RtnData C OccurNum Occur RtnNullRaw * Deal with the nulls C Move RtnNullRaw RtnNullNamed so that I can refer to ColTextNull instead of NullMap(9). Buck Calabro Billing Concepts Albany, NY mailto:mcalabro@commsoft.net * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This is the RPG/400 Discussion Mailing List! To submit a new * * message, send your mail to "RPG400-L@midrange.com". To unsubscribe * * from this list send email to MAJORDOMO@midrange.com and specify * * 'unsubscribe RPG400-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.