View previous topic :: View next topic
|
Author |
Message |
CJT
New User
Joined: 02 Aug 2007 Posts: 83 Location: Here
|
|
|
|
Hi, I just want to check if we have a hexadecimal value for pipe symbol in Cobol? and whether cobol can read a pipe delimited file? Any thoughts |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
When did COBOL get its own character set? I thought it used EBCDIC on the mainframe.
The COBOL Language Reference and Application Programming Guide do not have any references to 'pipe', which is a pretty good clue to your question's answer. |
|
Back to top |
|
|
CJT
New User
Joined: 02 Aug 2007 Posts: 83 Location: Here
|
|
|
|
I do know the '05' is the hexadecimal value for the tab character. I was just checking if Pipe also had one. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
The vbar is hex '4F' in the EBCDIC collating sequence. |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
COBOL can read files "delimited" by almost anything, but it is up to the programmer to code what to do with it after it is read. The question I have about this is where is the file coming from. If this file is being created in ASCII on a PC and then uploaded to the MF, you should test your method of converting from ASCII to EBCDIC to see how this character is converted. The easiest type of field to process in COBOL is fixed length fields. Would the "pipe delimited file" have variable length fields? |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
X'4F' is a vertical bar '|', and what is referred to as a pipe or broken vertical bar is X'6A'. |
|
Back to top |
|
|
|