Page 1 of 1

Avoiding the generation of files with 0 bytes

Posted: Wed Jun 25, 2003 9:36 am
by gpbarsky
Hi guys [:)].

I have a problem and I'd like all of you to help me resolving this item.

Running a server job wich generates sequential files in the DataStage server, some of those files have 0 (cero) bytes. Logically this is fine because of the process itself. But I don't want these files with (cero) 0 bytes to be generated [:(].

Does anybody know how can I avoid the generation of files with 0 (cero) bytes ?[?]

Thanks in advance [:D]

Posted: Wed Jun 25, 2003 10:02 am
by inter5566
Guillermo,

You may want to try the checkbox for "Omit last new-line" on the format tab of the sequential file input tab.
This worked for me when sending files to IBM 390.

Steve

Posted: Wed Jun 25, 2003 11:12 pm
by chulett
If Steve's advise doesn't work out and you can't avoid getting zero byte files, look into something like this.

Setup an after job (or after stage) routine to call a script that checks a file for a size of zero and deletes it if found. Pass in the path as a parameter. At worst case, they will be gone when the job finishes. [:D]

-craig