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

Process bad data in packed field..


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

New User


Joined: 17 Jun 2005
Posts: 14
Location: Chennai

PostPosted: Thu Mar 23, 2006 8:36 am
Reply with quote

Hi all,

I ran into this situation and needs everyone help.

I have a 4 byte packed field defined in a file. In the program, if the field is populated with value I am using the field.

But, I have bad data like null values (x'00000000') and spaces (x'40404040') in some records in this field. Now, I wanted to compare the packed field with these values and if it is present, I wanted to move zeroes into it. I need to process these records, i cannot bypass it.

When I tried comparing, it gave me compilation error as expected. I wanted to know if they is a way to process it.

Please let me know.

Thanks,
Virgon
Back to top
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Thu Mar 23, 2006 8:50 am
Reply with quote

Well I see couple of solutions here ( if I understand your problem correctly).

1. Check for that field agianst IS NUMERIC.
2. Why can we inspect that field for SPACE and NULL values and replace them with zeroes, instead of comparing???

Let us all know if this doesnt work.
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 Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top