On 08/06/2010, at 6:53 AM, Nancy Barney wrote:
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".
That's an ASCII Horizontal Tab. Is the data still in ASCII?
You say it was created by Excel but then it has to transferred to the  
host. That transfer probably converted from ASCII to EBCDIC therefore  
the Tab code-point will be different (X'05' in CCSID 37 which
is likely what you're using presuming you're in the US).
If the data is in a database file use DSPPFM to view then press  
F10=Hex then F11=Over/Under, locate the tab and see its corresponding  
hexadecimal code-point.
If the data is in a stream file then use DSPF to view and press  
F10=Hex. This command doesn't have an Over/Under option so locating  
the Tab is a bit harder.
If the data *IS* still ASCII then you probably want it in EBCDIC so  
either transfer in text mode rather than binary, or transfer to a  
stream file and use CPYFRMIMPF to convert and extract.
Regards,
Simon Coulter.
--------------------------------------------------------------------
   FlyByNight Software         OS/400, i5/OS Technical Specialists
   
http://www.flybynight.com.au/
   Phone: +61 2 6657 8251   Mobile: +61 0411 091 400        /"\
   Fax:   +61 2 6657 8251                                   \ /
                                                             X
                 ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------
 
As an Amazon Associate we earn from qualifying purchases.