View previous topic :: View next topic |
Author |
Message |
hogandeveloper Beginner
Joined: 05 Aug 2008 Posts: 11 Topics: 10
|
Posted: Fri Jun 18, 2010 4:30 am Post subject: need help to create a file in a required format |
|
|
Hi All,
I got a requirement such that i have a notepad file and it contains a few thousand ID numbers, i need to take these ID numbers and feed to a FB PS file in the below format. I need to prefill the fileds with spaces and zeroes for alpha numeric and numberic fields respectively and also prefix the field 123-ID-NUM PIC 9(15) with leading zeroes as the length of the ID number is not the same. Please assist me.
Code: |
01 123-FILE1.
05 FILLER PIC X(02).
05 FILLER PIC X(02).
05 123-FILE-LAYOUT.
10 FILLER PIC 9(15).
10 FILLER PIC X.
10 123-ID-NUM PIC 9(15).
10 FILLER PIC X.
10 123-CUST-KEY.
15 123-CO-ID PIC 9(04).
15 123-KEY PIC X(9).
15 123-TIE PIC 9(04).
10 FILLER PIC X.
10 123-CUST-AUTH-NO PIC 9(9) COMP-3.
10 FILLER PIC X(78).
|
Thanks in advance
HG |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Fri Jun 18, 2010 10:46 am Post subject: |
|
|
hogandeveloper,
show me an example of the notepad file values. Does it just have the ID numbers ? or any other data? _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|