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



On 5/9/2014 3:32 PM, Justin Taylor wrote:
AFAIK, putting individual null indicator fields after specific columns is valid. It compiles and seems to run OK.


Here's the DS:
D gDs ds Template
D Qualified Inz
D column1 4a Varying
D column2 20a Varying
D column3 5i 0
D column4 55a Varying
D column5 6a Varying
D column6 10i 0
D column7 10i 0
D null7 3i 0
D column8 1a Varying
D column9 1a Varying
D column10 3a Varying
D column11 200a Varying
D column12 10i 0
D column13 6a Varying
D column14 5i 0
D column15 6a Varying
D column16 1a Varying
D column17 10i 0
D column18 1a Varying

D Ds ds LikeDs(gDs)

Here's the local field definition:
D localNull7 s 3i 0

It won't take Ds.null7, but localNull7 goes right through.

I totally spaced on the 3i 0 definition. Try 5i 0 in the DS. This
works fine (7.1 TR 7):


D gDs ds Template
D Qualified Inz
D name 128a Varying
D dbname 128a Varying
D tbname 128a Varying
D tbname_null 5i 0
D tbmember 10a Varying
D tbmember_null 5i 0

D Ds ds LikeDs(gDs)

D localNull7 s 3i 0

c/free
exec sql
set option
naming = *sys,
closqlcsr = *endmod,
commit = *none,
datfmt = *ISO;

exec sql
declare tables cursor for
select name, dbname, tbname, tbmember
from systables;

exec sql
open tables;

exec sql
fetch tables into
:ds.name, :ds.dbname, :ds.tbname :ds.tbname_null,
:ds.tbmember :ds.tbmember_null;

if sqlstate <> '00000';
dsply sqlstate;
endif;

dump;

exec sql
close tables;

*inlr = *on;
/end-free

--buck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.