Thanks for the info. I tried this but it does not seem to work. It is not parsing the input data. Could you lay out the unstring statement. Maybe that will help me.
Have you told us if you are in an ASCII or EBCDIC environment (or some other coding scheme). This *will* impact the Hex value of the "tab character"
What you showed us is a represention of the STRING stmt you used. Try cut & pasting the ACTUAL code to your post text and send that. You may also want to include the FD and the READ stmt used before the STRING.
If you are processing an EBCDIC file, the Hex value
for a Tab is X'05'.
Regardless of the above, if you can use some kind of
file editor to view the file in Hex format, you can
then easily determine the actual hex value of the
delimiter used on the file.
Micro Focus COBOL expands tabs to spaces on input when reading a LINE SEQUENTIAL file. I don't think you can bypass this "feature". The way I got around it was to read the file using byte-stream processing. This is rather complex, so I wrote a sub-program to do it, which I call whenever I need to do special processing with a LINE SEQUENTIAL file.
The default for Micro Focus COBOL is to expand the tabs to spaces when reading a LINE SEQUENTIAL file. However, this feature can be turned OFF by creating a configuration file for the file handler. The configuration file should contain the following two statements.
[XFH-DEFAULT]
EXPANDTAB=OFF
Next, you need to set an environment variable to point to your configuration file as follows.
SET EXTFH=myconfigfile.cfg
If you are using Net Express this can be set in the Project Properties item from the tool bar.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.