Page 1 of 1

Insertion of Null Character at position 4095 in File

Posted: Wed Dec 14, 2011 8:53 am
by datisaq
My Job is creating a Fixed Width which is having record length of 4703.
The file is created successfully with some NULL Character at positon 4095.
I thought this might be coming from the Source table(Oracle) but i didn't find it any there.There is a field COB_COMMENT which is spread across 4095.

I have created a TEMP file with only COB_COMMENT field i didn't get any issue there.

Then I created another file from field 1 to field before COB_COMMENT(that means record length < 4095) there also i didn't find any NULL Character.

Once i have added all the field with total record length more than 4095 this Null Character is appearing.

I have tried options such as :-
1) Record Delimiter -- UNIX new line, record format -- fixed
2) Record Delimter -- End(Final Delimier at record level)
Delimter -- none
3) SPecified the Record length also using the record length property

Bu nothing as worked..... I think datastage is internally appending this trailing NULL chatracter at positon 4095. Is it's so then how do i change that??

If not please let me know what is the issue??

Posted: Wed Dec 14, 2011 9:21 pm
by datisaq
Hi datastage experts please look into this issue...

Posted: Thu Dec 15, 2011 12:25 am
by ray.wurlod
Could COB_COMMENT be (contain) a null-terminated string?

Posted: Thu Dec 15, 2011 1:03 am
by datisaq
Ys its a NULL terminated string... when i remove COB_COMMENT field and appending other fields in place of it... it's adding NULL terminated string at position 4095

Posted: Thu Dec 15, 2011 3:08 am
by Kirtikumar
What is the value for APT_STRING_PADCHAR in the env vairables?

Posted: Thu Dec 15, 2011 3:50 am
by datisaq
I am creating a fixed width file and i have set APT_STRING_PAD_CHAR to 0x20 value. I think this is the issue with the AIX server while dealing with the files of huge record length.

In AIX system,
when i am using this command "head -1 file_nm | sed 's/\000//g'" --- the output is displaying prperly its removing NULL character but if i write this to another file its adding again.

head -1 file_nm | sed 's/\000//g' ----- Displaying Output without NULL
head -1 file_nm | sed 's/\000//g' > File_nm1 --- can see the NULL charcter in File_nm1.

I think by default AIX is inserting this NULL character for a file whose record length is huge... Is this true??

Please help me out

Posted: Thu Dec 15, 2011 7:43 am
by chulett
Ask your SysAdmin.

Posted: Thu Dec 15, 2011 9:56 am
by FranklinE
I don't know AIX beyond the name, so this is a shot in the dark: what you are describing looks like a "hard" 4K boundary. 4,096 is exactly 1,024 times 4. Some older operating systems impose these "blocks" on how files are stored on the physical media.

Posted: Thu Dec 15, 2011 10:26 am
by rameshrr3
can you edit record metadata in column definitions and apply the properties for null field value or null field length , also do you have something set in Format Tab for property Null Field Value

Posted: Thu Dec 15, 2011 12:23 pm
by FranklinE
datisaq wrote:head -1 file_nm | sed 's/\000//g' > File_nm1 --- can see the NULL charcter in File_nm1.

I think by default AIX is inserting this NULL character for a file whose record length is huge... Is this true??
This is the description that leads me to believe that this is an environment issue, not a DataStage one except in that DS interacts with the operating system according to its requirements.

I believe that the inserted null is a 4K boundary insertion, a control character imposed by the file system. The way I see it, you have to reduce your output to stay under the limit. Sorry.