|
On 07-Jun-2010 18:09, Simon Coulter wrote:
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.
As I recall, the DSPF converts the presented data from an ASCII
CCSID to an EBCDIC CCSID [for a text stream file anyhow],
irrespective of job CCSID. I had always used the DMP command to get
the raw hex values of the data in a STMF.
Regards, Chuck
--
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing
list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.
As an Amazon Associate we earn from qualifying purchases.