Insertion of Null Character at position 4095 in File

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
datisaq
Participant
Posts: 154
Joined: Wed May 14, 2008 4:34 am

Insertion of Null Character at position 4095 in File

Post 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??
IBM Certified - Information Server 8.1
datisaq
Participant
Posts: 154
Joined: Wed May 14, 2008 4:34 am

Post by datisaq »

Hi datastage experts please look into this issue...
IBM Certified - Information Server 8.1
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Could COB_COMMENT be (contain) a null-terminated string?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
datisaq
Participant
Posts: 154
Joined: Wed May 14, 2008 4:34 am

Post 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
IBM Certified - Information Server 8.1
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Post by Kirtikumar »

What is the value for APT_STRING_PADCHAR in the env vairables?
Regards,
S. Kirtikumar.
datisaq
Participant
Posts: 154
Joined: Wed May 14, 2008 4:34 am

Post 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
IBM Certified - Information Server 8.1
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ask your SysAdmin.
-craig

"You can never have too many knives" -- Logan Nine Fingers
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post 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.
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
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post 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
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post 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.
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
Post Reply