Avoiding the generation of files with 0 bytes

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
gpbarsky
Participant
Posts: 160
Joined: Tue May 06, 2003 8:20 pm
Location: Argentina

Avoiding the generation of files with 0 bytes

Post 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]
inter5566
Premium Member
Premium Member
Posts: 57
Joined: Tue Jun 10, 2003 1:51 pm
Location: US - Midwest

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

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