Insertion of Null Character at position 4095 in File
Moderators: chulett, rschirm, roy
Insertion of Null Character at position 4095 in File
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??
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??
IBM Certified - Information Server 8.1
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 437
- Joined: Fri Oct 15, 2004 6:13 am
- Location: Pune, India
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
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
IBM Certified - Information Server 8.1
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.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
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.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??
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.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872