IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Hexadecimal value for pipe symbol in Cobol


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
CJT

New User


Joined: 02 Aug 2007
Posts: 83
Location: Here

PostPosted: Wed Nov 19, 2008 1:41 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Nov 19, 2008 1:58 am
Reply with quote

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
View user's profile Send private message
CJT

New User


Joined: 02 Aug 2007
Posts: 83
Location: Here

PostPosted: Wed Nov 19, 2008 2:00 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Nov 19, 2008 2:15 am
Reply with quote

The vbar is hex '4F' in the EBCDIC collating sequence.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Wed Nov 19, 2008 3:13 am
Reply with quote

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
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Wed Nov 19, 2008 4:19 am
Reply with quote

X'4F' is a vertical bar '|', and what is referred to as a pipe or broken vertical bar is X'6A'.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top