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
 
nondisplayable nonedittable fields needs to be removed.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: nondisplayable nonedittable fields needs to be removed.
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: 686
Location: Earth

PostPosted: Fri Aug 01, 2008 3:23 pm    Post subject:
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    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Fri Aug 01, 2008 3:46 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Fri Aug 01, 2008 5:01 pm    Post subject: Reply to: nondisplayable nonedittable fields needs to be rem
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

Site Director


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

PostPosted: Fri Aug 01, 2008 10:24 pm    Post subject:
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: 2504
Location: Atlanta, Georgia, USA

PostPosted: Sat Aug 02, 2008 5:54 pm    Post subject: Re: nondisplayable nonedittable fields needs to be removed.
Reply with quote

Click on this recent posting below -

http://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    Post subject:
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    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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm

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