‎2019 Dec 10 2:12 PM
Hi all,
we are creating program load logs in application server, using the below steps:
* Open in append mode if the flag is set
IF append_mode IS INITIAL. OPEN DATASET file_name FOR OUTPUT IN TEXT MODE ENCODING DEFAULT MESSAGE message.
ELSE.
OPEN DATASET file_name FOR APPENDING IN TEXT MODE ENCODING DEFAULT MESSAGE message.
ENDIF.
writing the internal table contents in it and then closing the dataset.
we are facing formating issues and the output file is having additional page breaks, alot of spaces.
Help in this appreciated.
‎2019 Dec 10 2:42 PM
maybe you could provide the structure of the internal table & the result
‎2019 Dec 10 4:30 PM
Problem doesn't seem to be with OPEN DATASET, it would be problem with your TRANSFER.
try with below syntax
len = strlen( mydata ).
TRANSFER dobj TO dset LENGTH len NO END OF LINE
‎2019 Dec 10 4:59 PM
As Thanga Prakash Thanga Raj said, please paste your code concerning TRANSFER. Does "a lot of spaces" means a lot of spaces at the end of each line, or a lot of blank lines between non-blank lines? Probably a screenshot will help us better understand!