Datastage Basic WriteSeq

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

nag0143
Premium Member
Premium Member
Posts: 159
Joined: Fri Nov 14, 2003 1:05 am

Post by nag0143 »

Thanks All For your Suggestions, Starting with i have no idea how you can do in Basic,Now i have couple of options to try my solution..

Thanks All
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

The point is always use WEOFSEQ will be required if you are opening an existing file. If you fail to use it, you could potentially have a "merged" effect of what you just wrote with what already existed in the file. This is absolutely an issue if you write fewer characters to the file than what currently exists.

The question is whether you do it right after opening an exisitng file for writing, or after you're finished. Unless we get a definitive answer as to the flavour ( :wink: for Ray) of the engine, you're probably better off using WEOFSEQ per Mike and Craigs recommendation, which is right after opening for update.

I'm leaving my code as it is, I'm pretty sure I tested this and wrote the appropriate logic for DS. But I have been known to be wrong... :shock:
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
mleroux
Participant
Posts: 81
Joined: Wed Jul 14, 2004 3:18 am
Location: Johannesburg, South Africa
Contact:

Post by mleroux »

Being one to do things the blunderingly ignorant way at times, what about just using cat and a pre-created text file with the headings?

Code: Select all

cat HeadingRow.txt SingleDataRow.txt > Output.txt; rm SingleDataRow.txt
Morney le Roux

There are only 10 kinds of people: Those who understand binary and those who don't.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Morney, that was mentioned earlier in the thread. However, the question posted was specifically how to do this in BASIC, hence this long and winding road... :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
mleroux
Participant
Posts: 81
Joined: Wed Jul 14, 2004 3:18 am
Location: Johannesburg, South Africa
Contact:

Post by mleroux »

A thousand apologies, effendi. :oops: *** LAME JOKE ALERT *** That's what happens when trying to scan through threads very quickly when hyper-threading is not enabled.
Morney le Roux

There are only 10 kinds of people: Those who understand binary and those who don't.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No worries. I know how that happens, especially with these multi-page wonders where you miss something from an earlier page. :D
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply