Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

criteria to decide non-printable character for cobol

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Viplav Modi

New User


Joined: 23 Jan 2013
Posts: 2
Location: India

PostPosted: Thu Apr 11, 2013 12:43 pm    Post subject: criteria to decide non-printable character for cobol
Reply with quote

Hello everyone,

This is my first post and I am a little scared to post a new topic as I am only going to dig something which has already been discussed in past several times so please accept my apologies in advance before I go forward and post my query.

This is with reference to the post COBOL NON PRINTABLE CHARACTERS
(http://ibmmainframes.com/about45429-0-asc-15.html).
As suggested by Ronald blur we can achieve this by coding two 256-byte working storage elements ..........
Using the code mentioned in that post I am able to change non-printable to characters to spaces.
Here as per the source and target table mapping I can see x'BA' which is character '[' getting replaced by x'40' (spaces). As per my understanding this '[' shouldn't be non-printable for cobol.
I tried to enter some of the source characters in a file to check how they will look like and figured out that this table mapping would replace some of the symbols (for ex:^ ) to spaces.
My query is on what basis we can decide a character is non-printable for cobol or not?
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Thu Apr 11, 2013 12:53 pm    Post subject: Reply to: criteria to decide non-printable character for cob
Reply with quote

Quote:
My query is on what basis we can decide a character is non-printable for cobol or not?


a <character>/byte is printable/non printable displayable/non displayable according to the CODE PAGE used,
not according to the programming language used PERIOD
( or in simpler words, according to the DEVICE used to <display>/<print> it )

the characters You showed apart the x'B3' are all perfectly displayable icon_cool.gif
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Thu Apr 11, 2013 1:38 pm    Post subject: Reply to: criteria to decide non-printable character for cob
Reply with quote

As enrico alludes, only you can tell what is/is not "displayable" for your requirement.

Take a 256-byte table of 00 to FF. Display it in HEX and "character" simultaneously. On your "output" mark off/note the hex values for the things you want to exclude (or include, probably, as there will be fewer, likely). Amend the program.
Back to top
View user's profile Send private message
Viplav Modi

New User


Joined: 23 Jan 2013
Posts: 2
Location: India

PostPosted: Thu Apr 11, 2013 2:23 pm    Post subject: Reply to: criteria to decide non-printable character for cob
Reply with quote

Thanks alot for such a quick response Enrico and Bill .
So far all I know is that x'12' is invalid/bad character/non-printable in my case. As per my requirement I am replacing this x'12' with apostrophe(').
But then the complete requirement states that other than this x'12' rest of the non-printable characters should be replaced by spaces.
It is not mentioned anywhere as what other characters are non-printable.

As enrico pointed out that a character is printable/non-printable according to the DEVICE used so I will try to figure out which device is being used here.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Thu Apr 11, 2013 3:04 pm    Post subject: Reply to: criteria to decide non-printable character for cob
Reply with quote

but apart the <hardware> capabilities
You should also keep in mind the APPLICATION point of view
not alway what You can print/display is valid for the APPLICATION
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1218
Location: Israel

PostPosted: Thu Apr 11, 2013 6:21 pm    Post subject:
Reply with quote

Maybe you should consider READABLE instead of PRINTABLE.
You have to decide if chars from B0 to BF are just "noise" or are worth the ink.
Back to top
View user's profile Send private message
Jose Mateo

Active User


Joined: 29 Oct 2010
Posts: 110
Location: Puerto Rico

PostPosted: Thu Apr 11, 2013 7:08 pm    Post subject: Reply to: criteria to decide non-printable character for cob
Reply with quote

Good day to all!

You have misunderstood Enrico on code-page. Code-page is not a device. Read on code-page so you could understand what Enrico is telling you.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us