Skip to Content
0
Former Member
Jun 14, 2005 at 04:23 AM

write field of length > 255 into file

33 Views

Please see below code snippet, the codes was working fine untill i realised that if i have fields large than 255 chars in REC-RECORD, the record written will be truncated at 255 chars!

How shld i go abt it?

I tried to changed RECORD to type string, but TRANSFER complains that we can't use string.

  • DATA DECLARATION

DATA: BEGIN OF REC OCCURS 5000,

RECORD(1024),

END OF REC.

  • OPENING FILE FOR WRITING..

open dataset e_file for output in text mode encoding default.

lOOP AT REC.

transfer REC to e_file.

ENDLOOP.

close dataset e_file.