Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 10309
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: 7315

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: 10309
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: 1243
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: 111
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
No new posts More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us