Warning :Missing record delimiter "\n", saw EOF in

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

pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Warning :Missing record delimiter "\n", saw EOF in

Post by pradkumar »

Hi,

I have searched the forum before posting this message and have tried all the options suggested. But still unable to remove the warning.

Iam loading data from a sequential file to a table . The format of the file i have put is

Record Levl:
Final Delimeter :End/None

Field Defaults:

Delimeter : |
Quote: None

The warning messages are
Sequential_File_8,0: Missing record delimiter "\n", saw EOF instead

Sequential_File_8,0: Import warning at record 442.

Sequential_File_8,0: Import complete; 442 records imported successfully, 1 rejected.

But seems source has 442 records and all the records are laoding into the target table . I dont understand "1 rejected."

Sample data :
45:30PM|2/12/2009 5:45:30PM|50|28|walmart|500 MAIN STREET |PA|15106^M

The file has ^M at the ending of each record and also for last record.

Anyone please let me know what changes i have to make in the format tab of sequential stage and how to avoid the warning messages?
Can i ignore this warning.

Thanks in Advace
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

Hi

You get Control M characters if you create a file in text editors (E.g text editors other than notepad in Windows) and import the file to unix.


Regards
Sreeni :)
nirdesh2
Participant
Posts: 56
Joined: Thu Nov 20, 2008 12:18 pm
Location: Noida

Post by nirdesh2 »

Just press 'Enter' at the end of the File.
Nirdesh Kumar
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

Thanks for your replys.

But you know iam pulling the file through an automated script and placing it on datastage server . And further using in a job.. So how can do this..

I would really appreciate your help..


Thanks
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Post by Kryt0n »

pradkumar wrote:Thanks for your replys.

But you know iam pulling the file through an automated script and placing it on datastage server . And further using in a job.. So how can do this..

I would really appreciate your help..


Thanks
Run the file through "od -c" and see if there is a newline on the last line

If it is all good, maybe suppress the warning with a message handler?

As for the ^M, transfer the file in ASCII mode rather than BINARY
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

Hi ,

The output of the command od -c got

0425340 6 T H A V E E | S E A T T L
0425360 E | W A | 9 8 1 1 2 - 5 2 1 1 |
0425400 | | | | | | | |
*
0425440 P r e - R e g i s t e r e d |
0425460 | | | | | | | |
0425500 \r \n \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
0425520 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
*
I dontundertand the format of the file.

Iam using the following script to get file from remote server

\sftp $FtpUser@$RemoteHost <<! 2> $tmpFile
cd $RemoteDir
lcd $Inbox
get ${FileName}*
quit
can i use ascii before the get command?

If i suppress the warning messgaes in dev .. Do i need to do the same thing on test/prod?

Please suggest your answers

Thanks In Advance
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, you can add an "ascii" command just before the get and it will convert the file to UNIX record terminators during the transfer. Or you can do what you are doing and simply tell DataStage that you're reading a DOS file, one that has CR/LF pairs as record terminators.

As to understanding the format of the "od -c" output, suggest you check the man page.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Post by Kryt0n »

pradkumar wrote:Hi ,

The output of the command od -c got

0425340 6 T H A V E E | S E A T T L
0425360 E | W A | 9 8 1 1 2 - 5 2 1 1 |
0425400 | | | | | | | |
*
0425440 P r e - R e g i s t e r e d |
0425460 | | | | | | | |
0425500 \r \n \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
0425520 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
*
I dontundertand the format of the file.

Thanks In Advance
Are you transferring a Word document or something other than a flat file? I'm assuming it isn't a standard flat file with all the '\0's.

A wild stab in the dark would suggest DS thinks you still have records left but because it has hit a \0, it is reading the end of the file.

As a test, you could try opening the document, copy the data out and paste in to a new text file (ensure the last line has an end of line marker) and run that through.
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

Hi

Iam pulling a file through sftp from a VMS remote system to datastage Unix server.

I have tried in the sftp script to pull the file using ascii mode but still the file has got control M characters on unix box.And when i run the datastage job to load in to table all the records are loading but with warnings
Sequential_File_8,0: Missing record delimiter "\n", saw EOF instead
Sequential_File_8,0: Import warning at record 454.
Sequential_File_8,0: Import unsuccessful at record 454.

And also i have tried different options like dos format , unix new line under format tab of sequential stage.But unsuccesfull in avoding the warnings.

Please throw anyother options i have to try ..

Thanks in Advance
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What happens if you specify null field value property as 000 ?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kailas
Participant
Posts: 21
Joined: Mon Nov 17, 2008 11:49 pm
Location: bangalore

Re: Warning :Missing record delimiter "\n", saw EO

Post by kailas »

Hi ,

Try with the given below format. It should work .

Record Lavel
Final delimeter=End
Record delimiter string=DOS format

Field Default
delimiter string=|
Null Filed value=' '
quote= none

kj
Scope
Premium Member
Premium Member
Posts: 63
Joined: Wed Jun 06, 2007 6:38 am
Location: Chennai

Post by Scope »

Try below unix command to remove the Control-M Character from a file

perl -pi -e 's/\r//g;' filename
Kumarez
kailas
Participant
Posts: 21
Joined: Mon Nov 17, 2008 11:49 pm
Location: bangalore

Post by kailas »

Control-M indicates the file is in dos(\\r\\n) format so one must use the following format ..

Record Lavel
Final delimeter=End
Record delimiter string=DOS format


kj
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

Hi Everyone,

I have tried all the option you have said .. But still not able to avoid the warnings..

I have tried by putting the NULL Filed value as '000' .

Is there any way can we set in sequential file stage format tab to avoid the warnings rather than removing the control M characters from command line??

Thanks in Advance
siauchun84
Participant
Posts: 63
Joined: Mon Oct 20, 2008 12:01 am
Location: Malaysia

Post by siauchun84 »

Can I know the column type you are using in the job for the last column before the next line?
Post Reply