× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



If no one can help you with the UNSTRING command, you could try importing the tab delimited file into a DB2 file first. Then process the DB2 file.

The CPYFRMIMPF command imports tab delimited files into DB2 files.
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/cl/cpyfrmimpf.htm

Thanks,
Kelly Cookson
Senior Programmer/Analyst
Dot Foods, Inc.
217-773-4486 x12676
www.dotfoods.com


-----Original Message-----
From: cobol400-l-bounces@xxxxxxxxxxxx [mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of Nancy Barney
Sent: Monday, June 07, 2010 3:53 PM
To: COBOL400-L@xxxxxxxxxxxx
Subject: [COBOL400-L] READING A TAB DELIMITED FILE IN ILE COBOL

I am trying to read a tab delimited file, which was created by Excel.
This ILE COBOL Version 6, Release 1.



I have the tab character in working storage defined as:



01 WS-HEX-TAB PIC X(01) VALUE X"09".



This is the unstring statement:



UNSTRING WS-INPUT

DELIMITED BY WS-HEX-TAB

INTO

IN-MEMBER-NUM

IN-LIC

IN-FILLER1

IN-GLN

IN-ST-DATE

IN-NAME

IN-ADDR1

IN-ADDR2

IN-CITY

IN-ST

IN-FILLER2

IN-ZIP

IN-PHONE

IN-DESC

IN-REG

Etc.....



It acts like it does not recognize the tab. When I go into the debugger,
the beginning of WS-INPUT is in the first field IN-MEMBER-NUM, and the
character that is supposed to be the tab character looks like a
highlighted square or box. It is not unstringing the data. The other
fields past the first field in the unstring statement are blank.



I had a similar problem with another file, which was a sequential file
with fields delimited by the "|" (vertical bar). In that situation, the
"|" character became a "]" (right bracket), and I was able to unstring
it. But I don't know what kind of character is represented by the
highlighted box.



I can't make the file comma delimited or space delimited because it has
name, description and address fields with commas and spaces.



Any help would be appreciated!





Nancy Barney

IT - Programmer

Dakota Drug, Inc.








As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.