Create a fixed width output using layout file
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I have below requirement and need to create a output in fixed width text file, which has the given layout for the header field given below. I have similar layout with start position and length of the fields for the detail records.
| Field # | Field Name | Start Position | Length | Mapping type | Values |
| 1 | Field 1 | 1 | 2 | Hardcode | 'A' |
| 2 | Field 2 | 3 | 5 | Hardcode | 'M' |
| 3 | Field 3 | 8 | 30 | Hardcode | 'C' |
| 4 | Field 4 | 38 | 30 | Hardcode | 'D' |
| 5 | Field 5 | 68 | 10 | Hardcode | 'A' |
| 6 | Field 6 | 78 | 20 | Hardcode | B |
| 7 | Field 7 | 98 | 8 | Insert Current Date FORMAT: CCYYMMDD | Current date |
| 8 | Field 8 | 106 | 595 | Fill-Space | Space |
Thanks
Naga
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @markcurry ,
Thanks for the solutions. This I can use for header and footer, however, it will be difficult to manage 100 of fields in detailed record. Any other solution for handling more fields can help.
Thanks again for the solution.
Thanks
Naga
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Naga
I've changed the workflow so that you have widths of your fields as an Input, then you can use a single Pad formula, hopefully that works for you...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks @markcurry....I am able to achieve with your solution. Thanks again..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
No problem, glad it helped you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for this solution, it actually helped me to solve similar kind of problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
5 years later this answer just saved my bacon thank you markcurry
