hi,
I am using datastage to create sequential files.This is a fixed width file with 8 columns as follows
EmpNo,FrstName,LastName,SSN,DeptNo,PhoneNo,Address1,Address2
This is a standard job that i use a number of times.Most of the times the layout remains the same, in certain cases i have to change the field positions
For example in below example field positions Phoneno,Deptno,SSN have changed from the standard layout
EmpNo,FrstName,LastName,PhoneNo,DeptNo,SSN,Address1,Address2
It can also be as follows
EmpNo,PhoneNo,FrstName,LastName,DeptNo,SSN,Address1,Address2
How do i handle such scenarios?
Please help
Thanks much in advance.
Sam
Dynamic File Layouts
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 20
- Joined: Thu Oct 06, 2005 12:23 pm
Pass in a job parameter that controls the layout and dynamically re-arrange what field goes where based on it. Should be fairly simple if you don't need 'Columns headings' as the first record.
If so then you'll need to figure a way to 'manually' write it out as your first record. Either that or keep the various 'heading' records in separate files and concatenate the appropriate one into the output... before job perhaps.
If so then you'll need to figure a way to 'manually' write it out as your first record. Either that or keep the various 'heading' records in separate files and concatenate the appropriate one into the output... before job perhaps.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers