Hi,
I am trying to create fixed width file with Numeric data type but one space is coming between for all columns.
Is there any way we can generate file width fixed format with numeric data type without space between columns.
*Note - Title made more descriptive - Content Editor*
Extra space between numeric columns in fixed width file
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 111
- Joined: Thu Jun 01, 2006 5:12 am
- Location: Detroit
-
- Participant
- Posts: 111
- Joined: Thu Jun 01, 2006 5:12 am
- Location: Detroit
-
- Participant
- Posts: 111
- Joined: Thu Jun 01, 2006 5:12 am
- Location: Detroit
You could also set explicit formatting by editing the column meta-data.
1) Go to the column listing on the outputfile
2) Select the column you want custom formatting on
3) Hit Ctrl-E (control-E) to bring up the Edit Column Meta-Data pop-up
At this point you have two options to try, one that I think will work:
4a) Click on Extended (Unsigned) to turn off sign bit
-or- One that I know will work:
4b) Click on the Integer Type Property on the Parallel Tab
5b) Add the C_format property to the column with a format that either does not allow for a sign or puts the sign in front of the number.
In either case put a highly visible comment in the job because no-one will ever figure out that you've done this later!
If you select the alternate (b) route - you can check the internet for plenty of references on the formats that can be used - search for "sprintf c format" and you should find instructions.
Here's one example
http://www.cplusplus.com/reference/clib ... io/printf/
And of course - the third (and easiest) option - reduce the width of the columns by one (assuming your numbers still all fit) to allow for the space for the sign!
1) Go to the column listing on the outputfile
2) Select the column you want custom formatting on
3) Hit Ctrl-E (control-E) to bring up the Edit Column Meta-Data pop-up
At this point you have two options to try, one that I think will work:
4a) Click on Extended (Unsigned) to turn off sign bit
-or- One that I know will work:
4b) Click on the Integer Type Property on the Parallel Tab
5b) Add the C_format property to the column with a format that either does not allow for a sign or puts the sign in front of the number.
In either case put a highly visible comment in the job because no-one will ever figure out that you've done this later!
If you select the alternate (b) route - you can check the internet for plenty of references on the formats that can be used - search for "sprintf c format" and you should find instructions.
Here's one example
http://www.cplusplus.com/reference/clib ... io/printf/
And of course - the third (and easiest) option - reduce the width of the columns by one (assuming your numbers still all fit) to allow for the space for the sign!