DSNTIAUL to DSNUTILB unload conversion

Amit Chaudhari

DSNTIAUL to DSNUTILB unload conversion
Hi

while converting existing DSNTIAUL Unload to DSNUTILB unload utility, I am
getting VB output file from DSNUTILB instead of FB which was in
DSNTIAUL, also Null indicators are in front of the field, too,instead of after, in
case you have nullable fields.

Due to this the downstream jobs failed because of record format change, i
tried to change the record format & Null indicator position after the field using
Fileaid/Syncsort, But i am getting spaces X'40' in DSNUTILB unload file
instaed of Null X'00' which are in DSNTIAUL unload file for empty fields while
looking the both the files in Hex format.

Is there any way to get these fields into X'00' format in DSNUTILB unload
file?

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/events/index.html is your DB2 Events calendar! RUG meetings,
Webcasts, Conferences- what is going on next?
RUG leaders- get your events on the calendar today!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Gerard LE ROY

Re: DSNTIAUL to DSNUTILB unload conversion
(in response to Amit Chaudhari)
Hi Amit,
In case of empty field : with DSNUTILB you'll get X'FF' before an empty
field instead of X'6F' (?) after the field with DSNTIAUL. For non empty
field, the indicator variable is still X'00' in either case.
Another difference is the padding character of VARCHAR field : X'40' (space)
with DSNUTILB instead of X'00' with DSNTIAUL.

If you can move the null indicator from after to before the field, then you
should be able to change X'40' to X'00' but keep in mind that you'll have to
read then write the file produced by DSNUTILB to make it readable by
programs expecting DSNTIAUL format.

Good luck.
Gerard

-----Message d'origine-----
De : IDUG DB2-L [mailto:[login to unmask email] De la part de amit
Envoyé : lundi 14 décembre 2009 12:21
À : [login to unmask email]
Objet : [DB2-L] DSNTIAUL to DSNUTILB unload conversion


Hi

while converting existing DSNTIAUL Unload to DSNUTILB unload utility, I am
getting VB output file from DSNUTILB instead of FB which was in
DSNTIAUL, also Null indicators are in front of the field, too,instead of
after, in
case you have nullable fields.

Due to this the downstream jobs failed because of record format change, i
tried to change the record format & Null indicator position after the field
using
Fileaid/Syncsort, But i am getting spaces X'40' in DSNUTILB unload file
instaed of Null X'00' which are in DSNTIAUL unload file for empty fields
while
looking the both the files in Hex format.

Is there any way to get these fields into X'00' format in DSNUTILB unload
file?

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 *
http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/events/index.html is your DB2 Events calendar! RUG
meetings,
Webcasts, Conferences- what is going on next?
RUG leaders- get your events on the calendar today!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is
the home of IDUG's DB2-L

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/rug/index.html - with almost 150 IDUG Regional User Groups,
there is probably one near you!
Regional User Groups are your local connection to the Worldwide DB2 User Community
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Don Leahy

Re: DSNTIAUL to DSNUTILB unload conversion
(in response to Gerard LE ROY)
I would recommend that you change the downstream processes to accept
DSNUTILB. In the long run that is the better way to go. IMO, it would be
better to go back to using DSNTIAUL than to reformat the file.

You must have had a good reason to convert from DSNTIAUL to DSNUTILB in the
first place. If necessary, use that reason to convince the owners of the
downstream processes to change.

On Thu, Dec 17, 2009 at 15:47, Gerard Le Roy <[login to unmask email]>wrote:

> Hi Amit,
> In case of empty field : with DSNUTILB you'll get X'FF' before an empty
> field instead of X'6F' (?) after the field with DSNTIAUL. For non empty
> field, the indicator variable is still X'00' in either case.
> Another difference is the padding character of VARCHAR field : X'40'
> (space)
> with DSNUTILB instead of X'00' with DSNTIAUL.
>
> If you can move the null indicator from after to before the field, then you
> should be able to change X'40' to X'00' but keep in mind that you'll have
> to
> read then write the file produced by DSNUTILB to make it readable by
> programs expecting DSNTIAUL format.
>
> Good luck.
> Gerard
>
> -----Message d'origine-----
> De : IDUG DB2-L [mailto:[login to unmask email] De la part de amit
> Envoyé : lundi 14 décembre 2009 12:21
> À : [login to unmask email]
> Objet : [DB2-L] DSNTIAUL to DSNUTILB unload conversion
>
>
> Hi
>
> while converting existing DSNTIAUL Unload to DSNUTILB unload utility, I am
> getting VB output file from DSNUTILB instead of FB which was in
> DSNTIAUL, also Null indicators are in front of the field, too,instead of
> after, in
> case you have nullable fields.
>
> Due to this the downstream jobs failed because of record format change, i
> tried to change the record format & Null indicator position after the field
> using
> Fileaid/Syncsort, But i am getting spaces X'40' in DSNUTILB unload file
> instaed of Null X'00' which are in DSNTIAUL unload file for empty fields
> while
> looking the both the files in Hex format.
>
> Is there any way to get these fields into X'00' format in DSNUTILB unload
> file?
>
>
>

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.IDUG.org membership is now free.
Do you have people in your office who are not an IDUG member?
Show them how to access the information and help train the next generation of DB2 Users!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Peter Vanroose

Re: DSNTIAUL to DSNUTILB unload conversion
(in response to Don Leahy)
> [...] But i am getting spaces X'40' in DSNUTILB unload file
> instead of Null X'00' which are in DSNTIAUL unload file.

This *should* not affect the end application which is going to read the
unload file, I would expect:
Suppose you have a VARCHAR(40) field, which thus takes 42 bytes (not
counting the NULL indicator): 2 bytes for the length and 40 bytes for the data.
But suppose the actual length is 10 (as will be indicated by the two length
bytes): in that case the last 30 bytes may be whatever (in practice X'00' or
X'40') since only the first 10 bytes will have to be accessed by the
application.

-- Peter Vanroose
ABIS Training & Consulting.

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-videos.html has hundreds of video presentations!
Did you miss out on attending an IDUG conference?
Many of the presentations were recorded and are available on our website!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L