Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

datastage basic write statement

Status
Not open for further replies.

rsandler

Programmer
Sep 11, 2006
3
US
i have a ds routine that, in some cases, has to write entries to two hash files. in using the write statement, it appears that i can only write out one field plus the key at a time. so for a record with four fields, i do a writeu for the key and the first field and then a writevu and a writev for the other two fields. this seems like it shouldn't be necessary, but i haven't been able to figure out how to write the whole record out at once. help anyone???

thanks!!!
 
To write multiple fields to the same record do the following (using your 4 field example).

Instead of:
writev field1 to file,key,1 else...
writev field2 to file,key,2 else...
writev field3 to file,key,3 else...
writev field4 to file,key,4 else...

Use:
record=field1:mad:FM:field2:mad:FM:field3:mad:FM:field4
write record to file, key else....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top