Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Value Change in Examine has hex digits?? 1

Status
Not open for further replies.
Sep 1, 2004
9
US
First, I am getting the error 163, I understand what the error means, but I dont understand .. when i examine the value that is giving me the invalid data in numeric fild, the value changes has 20 00 00 00 00 00 listed... why is this in here?

More info available if needed, i am just learning cobol and have been working on this problem for hours literaly!
 
I don't quite understand your question. Are you asking how this data got into the field? Did you do anything to "initialize" it? How is the numberic field defined?

From the mention of a "163" error, I assume this is Micro Focus with the +F switch turned on. Is this correct.

Hex "20 00 00 ..." looks (ot me) like a space followed by low-values, but it is impossible for "us" to tell you how that got there without knowing your program logic.

Bill Klein
 
The program is updating a master from a transaction file.
The field is credit-limit-wk pic 9(7).
Funny thing is... as soon as I animate to step thru the program I checked the value of this field and it already says invalid data in numeric field when examined and I havenet even done my first statement or steped thru anythign and it already has invalid data.. which makes no sense to me. When I go ahead and step thru.. this is the statement that the 163 error comes up on.


IF CHANGE-CREDIT-LIMIT-WK NOT = SPACES
MOVE CHANGE-CREDIT-LIMIT-WK TO NEWMASTER-CUST-CREDIT-OUT
ELSE
MOVE MASTER-CUST-CREDIT-IN TO NEWMASTER-CUST-CREDIT-OUT.

Sorry that I cannot explain better, I am very new at this, but will try to give you any info you need.

jennifer
 
You may try this:
IF CHANGE-CREDIT-LIMIT-WK NUMERIC

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
WMK said:
Did you do anything to "initialize" it?
[tt] Like Bill asked, how are you initializing (clearing) CHANGE-CREDIT-LIMIT-WK before you use it as a receiving field? Additionally, you've shown us CHANGE-CREDIT-LIMIT-WK as a sending field, now show us the code that uses CHANGE-CREDIT-LIMIT-WK as a receiving field (e.g.; loads CHANGE-CREDIT-LIMIT-WK with the value that you ultimately move to NEWMASTER-CUST-CREDIT-OUT)[/tt]
 
If you don't have a VALUE clause, then it is HIGHLY LIKELY that you will have "invalid data" at the beginning of the program (before you move anything there).

Either add a VALUE clause or don't reference (check it, examine it, or do anything else with it) until AFTER you move something to the field.

Bill Klein
 
Did this program even compile successfully? If you are using micro focus server express try this....

IF (CHANGE-CREDIT-LIMIT-WK NOT = SPACES)......
..............
 
I really appreicate all the help.. I have tried all of the suggestions. The one that helped the most was setting the values (initializing) to zeros.

BUT, there was also an error in the data file that my teacher had given us. I found it myself today.

Thanks again for the responses

jennifer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top