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

nondisplayable nonedittable fields needs to be removed.


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

New User


Joined: 07 Dec 2007
Posts: 26
Location: Bangalore

PostPosted: Fri Aug 01, 2008 3:18 pm
Reply with quote

When I unload some records from the db2 table . A particular field has got some nondisplayable noneditable characters .

I want to read this field and remove the nondisplayable/noneditable characters from this field.

For eg ABC DEF

The space indicates a nondisplayable/noneditable character .

I want it as ABCDEF

How can this be done.

Thanks
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Fri Aug 01, 2008 3:23 pm
Reply with quote

Quote:
When I unload some records from the db2 table . A particular field has got some nondisplayable noneditable characters .

What is the definition of that field in table?
Quote:
The space indicates a nondisplayable/noneditable character .
Non displayable is ok, but could you explain why non editable?
Back to top
View user's profile Send private message
Aniyaa

New User


Joined: 07 Dec 2007
Posts: 26
Location: Bangalore

PostPosted: Fri Aug 01, 2008 3:45 pm
Reply with quote

nondisplayable and noneditable means that even if you open the dataset in edit mode you can't edit that particular character.
for eg , if there is a tab represented by X(05) (in mainframes) in the field
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Aug 01, 2008 3:46 pm
Reply with quote

FIND P'.' will bring you to non-display type char. It will also let you know the X'??' value.

I will skip over the normal, why do you want to do this? and proceed directly to an answer.

you can change non-display types with a
Code:
CHANGE ALL P'.' ' '
or
CHANGE ALL P'.' ''


the first will replace all with space, the second will actually remove the char, effectively shifting everthing on the line.

in your case, this dumped column is hopefully lined up, (lets pretend that this ABC?DEF is in columns 11 thru 17. then you could use:
Code:
CHANGE ALL P'.' ' ' 11 17
or
CHANGE ALL P'.' '' 11 17

this will preclude removing non-displays in other columns.
Back to top
View user's profile Send private message
Aniyaa

New User


Joined: 07 Dec 2007
Posts: 26
Location: Bangalore

PostPosted: Fri Aug 01, 2008 4:41 pm
Reply with quote

Actually I forgot to mention that i need to do this using a cobol program.. its not a one-time thing , it needs to be done daily on the input file. I need a cobol statement to do the same.
Suppose the field is NAME from the input file .
I need to ensure that NAME has no such characters.

Sorry I dint' mention this before .
Back to top
View user's profile Send private message
Aniyaa

New User


Joined: 07 Dec 2007
Posts: 26
Location: Bangalore

PostPosted: Fri Aug 01, 2008 4:50 pm
Reply with quote

What I was looking for is something like

INSPECT field-name REPLACING P'.' BY ' '

but the above doesn't work icon_sad.gif
Back to top
View user's profile Send private message
Aniyaa

New User


Joined: 07 Dec 2007
Posts: 26
Location: Bangalore

PostPosted: Fri Aug 01, 2008 4:59 pm
Reply with quote

Hi ,

I am happy to inform that i got the solution

its

INSPECT field-name REPLACING ALL LOW-VALUES BY SPACES

its works.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Aug 01, 2008 5:01 pm
Reply with quote

Good You got the solution,
but.... what about investigating why those hex bytes were there ???
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Aug 01, 2008 10:24 pm
Reply with quote

Hello,

Quote:
INSPECT field-name REPLACING ALL LOW-VALUES BY SPACES
This will not do what you posted you need. . .
Quote:
For eg ABC DEF

I want it as ABCDEF
The statement you posted will still have a space in the middle. It will also replace x'00' and you mentioned x'05'.

If your orginal requirement was correct, your "solution" cannot work. . .
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sat Aug 02, 2008 5:54 pm
Reply with quote

Click on this recent posting below -

ibmmainframes.com/viewtopic.php?t=32610

Regards,

Bill
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: Mon Aug 04, 2008 10:03 pm
Reply with quote

One of the UNLOAD utilities (I don't recall which one) separates the columns of the rows by a byte of X'00'. I suspect that's where the low-value bytes are coming from.
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 leading spaces can be removed in trai... DFSORT/ICETOOL 1
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts Cobol COMP-2 fields getting scrambled... Java & MQSeries 6
No new posts Converting unpacked fields to pack us... SYNCSORT 4
No new posts Data for newly added fields not displ... IMS DB/DC 6
Search our Forums:

Back to Top