|
Hi Werner, apparently I cannot specify an externally described data structure to get my fields. I manually specified the fields and a 2b 0 indicator field, and now the SQLCOD is *zeros. Thanks for the help. Peter Colpaert Application Developer Honda Europe NV Langerbruggestraat 104 B-9000 GENT Belgium Peter.Colpaert@honda-eu.com Tel: +32 9 2501 334 Fax: +32 9 2501 231 ---------- Yoda of Borg are we: Futile is resistance. Assimilate you, we will. ---------- Werner Noll <werner.noll@gefis.com>@midrange.com on 24/09/2002 13:14:20 Please respond to rpg400-l@midrange.com Sent by: rpg400-l-admin@midrange.com To: "'rpg400-l@midrange.com'" <rpg400-l@midrange.com> cc: Subject: AW: SQLCODE -305 Peter, what we do when processing files with null-capable fields is to specify a null-indicator field in the fetch command. Don't forget to specify in the header card "ALWNULL(*USRCTL)"! Exmple code from a actual program (just look at the 2 fields, specified below). D #Prod_Geb_Nr s 30a Varying D #Prod_Geb_i s 2b 0 C/EXEC SQL C+ fetch jab into :#insel,:#herstelldat,:#hlkznr,:#korrza,:#teilid, C+ :#dokelem,:#meldid,:#anlnr,:#hlkztag, C+ :#pagtlnr,:#tlcls :#tlcls_i,:#docls :#docls_i, C+ :#erw :#erw_i, C+ :#insel_alt,:#prod_masch :#prod_m_i, C+ :#auftrags_nr :#auf_nr_i,:#Prod_Geb_Nr :#Prod_Geb_i C/END-EXEC * Produktionsgebindenummer C if #Prod_Geb_i < 0 C eval abpgn = *blanks C else C movel(p) #Prod_Geb_Nr abpgn C endif I don't know an easier method for files with null-fields. Kind regards, GEFIS Gesellschaft für Individual-Software mbH Werner Noll ______________________________________________________________________ The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or the entity to whom it is addressed and others authorised to receive it. If you have received it by mistake, please let the sender know by e-mail reply and delete it from your system. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance of the contents of this information is strictly prohibited and may be unlawful. Honda Europe NV is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt.
As an Amazon Associate we earn from qualifying purchases.
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.