Hi,
Is there any way/logic to update records in a Sequential File ?
Updating a Sequential File
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 353
- Joined: Mon Jan 17, 2011 5:03 am
- Location: Mumbai, India
Updating a Sequential File
Thanx and Regards,
ETL User
ETL User
-
- Premium Member
- Posts: 353
- Joined: Mon Jan 17, 2011 5:03 am
- Location: Mumbai, India
That's the nature of sequential media.
You may be able to do something magical under the covers with C or something similar but for a "pure" DataStage solution there's no magic that I've ever seen. Of course, our resident Magician may say otherwise.![Wink :wink:](./images/smilies/icon_wink.gif)
You may be able to do something magical under the covers with C or something similar but for a "pure" DataStage solution there's no magic that I've ever seen. Of course, our resident Magician may say otherwise.
![Wink :wink:](./images/smilies/icon_wink.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I do this a lot when updating values files of Parameter Sets.
One approach is to overwrite the file entirely, using a Sequential File stage. That's the way I normally do it, particularly when the number of parameters in the Parameter Set is small.
The other is to use a Hashed File stage in a server job, opening the file's parent directory as if it were a table, and treating the file name as a record key. This having been done, the individual "fields" (lines) can be updated.
One approach is to overwrite the file entirely, using a Sequential File stage. That's the way I normally do it, particularly when the number of parameters in the Parameter Set is small.
The other is to use a Hashed File stage in a server job, opening the file's parent directory as if it were a table, and treating the file name as a record key. This having been done, the individual "fields" (lines) can be updated.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.