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

Problem with Low-values and high-values


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

New User


Joined: 20 Feb 2007
Posts: 12
Location: banglore

PostPosted: Wed Dec 05, 2007 8:21 pm
Reply with quote

Hi all,

In my cobol program i have a condition like

IF NCC-PREF-VAL-CD = SPACES OR LOW-VALUES or HIGH-VALUES
CONTINUE
ELSE
PERFORM 2002-PROCESS-INPUT THRU 2002-EXIT
END-IF.

NCC-PREF-VAL-CD field which i get from input file. i need to check that field to process record. even though there is junk data input file, 2002-PROCESS-INPUT is getting process.

is there any case, can a field contains other than spaces/low/high values which are junk datas.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Dec 05, 2007 8:40 pm
Reply with quote

mrdilipchand wrote:
is there any case, can a field contains other than spaces/low/high values which are junk datas.


For a each character position in a field there are 256 possible values. Space, high-values, and low-values are just 3 of those, of the other 253 possiblities you whould have to decide what else is JUNK and what is valid!
Back to top
View user's profile Send private message
mrdilipchand

New User


Joined: 20 Feb 2007
Posts: 12
Location: banglore

PostPosted: Wed Dec 05, 2007 8:51 pm
Reply with quote

Acutally there are low-values(like >>H) in my input file for the specified field.But the condition is not getting satisfied and it is going to 2002-process-input para which shouldnt be executed
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Dec 05, 2007 9:25 pm
Reply with quote

mrdilipchand wrote:
IF NCC-PREF-VAL-CD = SPACES OR LOW-VALUES or HIGH-VALUES


If NCC-PREF-VAL-CD length is greater than 1 your test will fail if it contains a mix of characters. You are not testing to see if contains any spaces or any low-values or any high-values you are testing to see if it contains all spaces or all low-values or all high-values!
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: Wed Dec 05, 2007 10:56 pm
Reply with quote

Hello,

Quote:
Acutally there are low-values(like >>H)
Those are not low-values (they are not high-values either).

If you look at your data in tso/ispf with HEX ON and post a bit of it here (using the "Code" tab near the top of the reply panel), we can explain what is in you data.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Dec 06, 2007 3:17 am
Reply with quote

I wish you guys would stop calling that data "junk".

Suppose you wrote your yearly salary amount (rounded to the nearest dollar) to a file, and you saw this:

@

That is not "junk" my friend. You just made $1,234,567 this year.
Back to top
View user's profile Send private message
salman.ahmed

New User


Joined: 06 Dec 2007
Posts: 1
Location: India

PostPosted: Fri Dec 07, 2007 7:46 pm
Reply with quote

Hi i checked with a variable of alphanumeric or numeric nature ... in hex format the value for low-value being passed is 00000 and for high-values being passed is fffff there the junk value cannot be either of the twos it is performing the else procedure.....
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 Dec 07, 2007 9:31 pm
Reply with quote

Hello salman.ahmed and welcome to the forums,

Quote:
Hi i checked with a variable of alphanumeric or numeric nature ... in hex format the value for low-value being passed is 00000 and for high-values being passed is fffff there the junk value cannot be either of the twos it is performing the else procedure.....
Most often "junk" is neither high- or low-values. It is usually some hex value (see Jack's previous post) that is either unexpected or unwanted.

When unexpected values are encountered, seeing the value(s) in hex often helps understand what they are. If you post the values (in hex) we can help explain them.
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
Search our Forums:

Back to Top