Page 1 of 1

Posted: Thu Jun 05, 2003 7:27 am
by tonystark622
Raggy,
On the Sequential File stage where you are writing the data out, do you have the "Update Action" set to "Overwrite existing file" or "Append to existing file"?

Also, you may want to land the data in another sequential file, then delete the original and rename the file you wrote to the original name. Just a suggestion.

Let us know what fixes it[:)]

Good Luck,
Tony

Posted: Thu Jun 05, 2003 8:36 am
by chulett
You can't "update" a sequential file in DataStage, even when using BASIC. You'll need to do as Tony suggests and write the changes out to a new file. Then once complete, you can play musical filenames and rename them as you see fit.

-craig

Posted: Thu Jun 05, 2003 9:24 am
by chulett
Depends on your operating system, as that is what you'll need to use. Either write a script that takes appropriate parameters and run that or execute the o/s "mv/ren" command directly.

In either case, look up DSExecute.

-craig

Posted: Thu Jun 05, 2003 6:13 pm
by ray.wurlod
Just to tidy this one up, you CAN update sequential files with DataStage BASIC, but the filepointer must be manipulated exactly (using SEEK, and the FILEINFO function to determine position to which to return) and the line length cannot be changed.
The two file approach is definitely better.

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518