Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tab delimited question 2

Status
Not open for further replies.

bhl

IS-IT--Management
Aug 22, 2001
27
0
0
US
I have a Tab delimited file that I have to unstring.

unstring XXX.xxx delimited by "TAB" into xxxxxx

What is the character I need to use as the delimiter (tab)to get this statement to work.
 

The "TAB" character must be defined as X"09".

Gianni
 
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.



 
The statement I used is

unstring XXX.xxx delimited by X'09' into xxxxxx

I also tried " and a data element with the value x'09'

Thanks

 
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"
 
Hi bhl,

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.

Regards, Jack.

 
bhl

Hex X'09' is the ASCII Translation for a Tab.

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.

Hope that helps.
 
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.


Saginaw
helpdesk@simotime.com
 
Hey guys, I think bhl...vis has left the building. :)
 
Sorry have been away. With all of your suggestions have resolved the issue.

Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top