Skip to main content

How to read ascii file which includes comp-3 variable

  • June 21, 2021
  • 0 replies
  • 0 views

Greetings to everyone!

I have file which is created as ascii, in that one of the field is comp-3.

my requirement is to read the file and insert records to table.

Am able to read alphanumeric fields after introducing special name and code-set clause, but am facing issue in processing comp-3 field.

example which I incorporated to read ascii file.

SPECIAL-NAMES.
ALPHABET TEST-COLLATE IS STANDARD-1.

FD SRC-FL
CODE-SET IS TEST-COLLATE.
01 VM-SRC-FL-REC.
05 VM-DISPLAY-FLDS.
   10 VM-VENDOR-CODE PIC X(6).
   10 VM-VENDOR-NAME PIC X(25).
   05 VM-COMP-FLDS.
    10 VM-TXN-LMT PIC S9(09) COMP.
    10 VM-TXN-AMT-LMT PIC S9(16)V9(02) COMP-3. <--facing issue in this field

If I do comment out comp-3 field population logic its working fine, Hence I need suggestion to process comp-3 fields too. Thanks Again!

FYI, Am using enterprise eclipse developer 6.0. 


#EnterpriseDeveloper

0 replies

Be the first to reply!