I created a comma delimited file by just setting up the record with comma fields. It has fixed length records in it but since each field is fixed there is a lot of free space at the end of each field. Is there a way I can compress the data in the fields to get rid of the blank space at the end of each field.
This is run on Microfocus COBOL.
Thanks
Bruce
Following is the record layout.
Select KO-Purge1-in-file
Assign to "d:\btftp\bookpgms\purge1.txt"
organization is line sequential.
FD KO-Purge1-in-file.
01 KO-Purge1-record.
05 KO-Purge1-seller-prefix pic X(3) value "CDB".
05 KO-Purge1-seller-number pic 9(8) value zeros.
05 comma-1 pic X value ",".
05 KO-Purge1-author pic X(50) value spaces.
05 comma-2 pic X value ",".
05 KO-Purge1-title pic X(50) value spaces.
05 comma-3 pic X value ",".
05 KO-Purge1-illustrator pic X(25) value spaces.
05 comma-4 pic X value ",".
05 KO-Purge1-book-condition pic X(5) value spaces.
05 comma-5 pic X value ",".
05 KO-Purge1-book-size pic X(5) value spaces.
05 comma-6 pic X value ",".
05 KO-Purge1-jacket-condition pic X(5) value spaces.
05 comma-7 pic X value ",".
05 KO-Purge1-binding pic X(50).
05 comma-8 pic X value ",".
05 KO-Purge1-book-type pic X(5) value spaces.
05 comma-9 pic X value ",".
05 KO-Purge1-ISBN pic X(13) value spaces.
05 comma-10 pic X value ",".
05 KO-Purge1-publisher pic X(50) value spaces.
05 comma-11 pic X value ",".
05 KO-Purge1-publish-place pic X(5) value spaces.
05 comma-12 pic X value ",".
05 KO-Purge1-publish-date pic X(7) value spaces.
05 comma-13 pic X value ",".
05 KO-Purge1-edition pic X(5) value spaces.
05 comma-14 pic X value ",".
05 KO-Purge1-inscription pic X(5) value spaces.
05 comma-15 pic X Value ",".
05 KO-Purge1-description pic X(300) value spaces.
05 comma-16 pic X value ",".
05 KO-Purge1-quantity pic ZZZZZ value spaces.
05 comma-17 pic X value ",".
05 KO-Purge1-price pic ZZZZZ.99 value zeros.
05 comma-18 pic X value ",".
05 KO-Purge1-image pic X(5) value spaces.
05 comma-19 pic X value ",".
05 KO-Purge1-category pic X(128) value spaces.
05 comma-20 pic X value ",".
05 KO-Purge1-c2 pic X(5) value spaces.
05 comma-21 pic X value ",".
05 KO-Purge1-c3 pic X(5) value spaces.
05 comma-22 pic X value ",".
05 KO-Purge1-c4 pic X(5) value spaces.
05 comma-23 pic X value ",".
05 KO-Purge1-c5 pic X(5) value spaces.
05 comma-24 pic X value ",".
05 KO-Purge1-kwd1 pic X(5) value spaces.
05 comma-25 pic X value ",".
05 KO-Purge1-kwd2 pic X(5) value spaces.
05 comma-26 pic X value ",".
05 KO-Purge1-kwd3 pic X(5) value spaces.
05 comma-27 pic X value ",".
05 KO-Purge1-kwd4 pic X(5) value spaces.
05 comma-28 pic X value ",".
05 KO-Purge1-kwd5 pic X(5) value spaces.
05 comma-29 pic X value ",".
05 KO-Purge1-kwd6 pic X(5) value spaces.
05 comma-30 pic X value ",".
05 KO-Purge1-kwd7 pic X(5) value spaces.
05 comma-31 pic X value ",".
05 KO-Purge1-kwd8 pic X(5) value spaces.
05 comma-32 pic X value ",".
05 KO-Purge1-kwd9 pic X(5) value spaces.
This is run on Microfocus COBOL.
Thanks
Bruce
Following is the record layout.
Select KO-Purge1-in-file
Assign to "d:\btftp\bookpgms\purge1.txt"
organization is line sequential.
FD KO-Purge1-in-file.
01 KO-Purge1-record.
05 KO-Purge1-seller-prefix pic X(3) value "CDB".
05 KO-Purge1-seller-number pic 9(8) value zeros.
05 comma-1 pic X value ",".
05 KO-Purge1-author pic X(50) value spaces.
05 comma-2 pic X value ",".
05 KO-Purge1-title pic X(50) value spaces.
05 comma-3 pic X value ",".
05 KO-Purge1-illustrator pic X(25) value spaces.
05 comma-4 pic X value ",".
05 KO-Purge1-book-condition pic X(5) value spaces.
05 comma-5 pic X value ",".
05 KO-Purge1-book-size pic X(5) value spaces.
05 comma-6 pic X value ",".
05 KO-Purge1-jacket-condition pic X(5) value spaces.
05 comma-7 pic X value ",".
05 KO-Purge1-binding pic X(50).
05 comma-8 pic X value ",".
05 KO-Purge1-book-type pic X(5) value spaces.
05 comma-9 pic X value ",".
05 KO-Purge1-ISBN pic X(13) value spaces.
05 comma-10 pic X value ",".
05 KO-Purge1-publisher pic X(50) value spaces.
05 comma-11 pic X value ",".
05 KO-Purge1-publish-place pic X(5) value spaces.
05 comma-12 pic X value ",".
05 KO-Purge1-publish-date pic X(7) value spaces.
05 comma-13 pic X value ",".
05 KO-Purge1-edition pic X(5) value spaces.
05 comma-14 pic X value ",".
05 KO-Purge1-inscription pic X(5) value spaces.
05 comma-15 pic X Value ",".
05 KO-Purge1-description pic X(300) value spaces.
05 comma-16 pic X value ",".
05 KO-Purge1-quantity pic ZZZZZ value spaces.
05 comma-17 pic X value ",".
05 KO-Purge1-price pic ZZZZZ.99 value zeros.
05 comma-18 pic X value ",".
05 KO-Purge1-image pic X(5) value spaces.
05 comma-19 pic X value ",".
05 KO-Purge1-category pic X(128) value spaces.
05 comma-20 pic X value ",".
05 KO-Purge1-c2 pic X(5) value spaces.
05 comma-21 pic X value ",".
05 KO-Purge1-c3 pic X(5) value spaces.
05 comma-22 pic X value ",".
05 KO-Purge1-c4 pic X(5) value spaces.
05 comma-23 pic X value ",".
05 KO-Purge1-c5 pic X(5) value spaces.
05 comma-24 pic X value ",".
05 KO-Purge1-kwd1 pic X(5) value spaces.
05 comma-25 pic X value ",".
05 KO-Purge1-kwd2 pic X(5) value spaces.
05 comma-26 pic X value ",".
05 KO-Purge1-kwd3 pic X(5) value spaces.
05 comma-27 pic X value ",".
05 KO-Purge1-kwd4 pic X(5) value spaces.
05 comma-28 pic X value ",".
05 KO-Purge1-kwd5 pic X(5) value spaces.
05 comma-29 pic X value ",".
05 KO-Purge1-kwd6 pic X(5) value spaces.
05 comma-30 pic X value ",".
05 KO-Purge1-kwd7 pic X(5) value spaces.
05 comma-31 pic X value ",".
05 KO-Purge1-kwd8 pic X(5) value spaces.
05 comma-32 pic X value ",".
05 KO-Purge1-kwd9 pic X(5) value spaces.