View previous topic :: View next topic
|
Author |
Message |
Keanehelp
New User
Joined: 27 May 2008 Posts: 71 Location: USA, CA.
|
|
|
|
Consider a file having the data as below:-
102678abcd
203878dfgd
204675zxvz
305698efra
Consider the following format for the above file :
SERIAL PIC 9(1)
OFFICE PIC 9(2)
ACCT PIC 9(3)
DATA PIC X(4)
I need to create a report for the above file in the following format:
HEADER
SUB-HEADER
SERIAL ---> 1
OFFICE ACCOUNT DATA
-----
----
-
SUB-HEADER
SERIAL ----> 2
OFFICE ACCOUNT DATA
.....
Please note it is not necessary that serial number will always be 1 2 or 3. The file is sorted on the basis of first 5 digits. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Consult your manual, look at the "reporting functions" on OUTFIL, HEADERn, TRAILERn, SECTIONS, there are many examples here. |
|
Back to top |
|
|
Keanehelp
New User
Joined: 27 May 2008 Posts: 71 Location: USA, CA.
|
|
|
|
@Bill Woodger ...Thanks, just a question is this feasible using sort? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Yes. As I said, there are many examples here. |
|
Back to top |
|
|
|