View previous topic :: View next topic
|
Author |
Message |
diwakarsen
New User
Joined: 04 Jul 2007 Posts: 3 Location: india
|
|
|
|
Hi, I have one Query which is related to SOC7
We have one date filed defined in the program as below
FIELD1-DATE PIC S9 (09) COMP-3.
FIELD1-DATEX REDEFINES FIELD1-DATE
PIC X (05).
The value in the file corresponding to this field in hexadecimal is
FIELD1-DATE FIELD1-DATEX
5/PS 5/AN
(972-976) (972-976)R
255-------------- 256---------------
00000 00000
000C0 000C0
The program is written like below.
IF FIELD1-DATEX NOT EQUAL SPACES OR LOW-VALUES
IF FIELD1-DATE EQUAL ZEROES - GETTING SOC7 ABEND IN THIS LINE
MOVE ZEROES TO FIELD1-DATE
ELSE
DISPLAY ‘ERROR’
END-IF
END-IF.
I need to check in the program that if FIELD1-DATE is neither SPACES nor LOW-VALUES then whether FIELD1-DATE contains zero or some other value. Can you help me? I need the solution of this ASAP.
Thanks.
Diw |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Diw and welcome to the forum,
After the test for spaces and low values, you need to check if the field is numeric. If the field is not numeric, don't check for zeros or any other number as that will cause the 0c7. If the field is numeric, continue validating any numeric values that need to be checked. |
|
Back to top |
|
|
diwakarsen
New User
Joined: 04 Jul 2007 Posts: 3 Location: india
|
|
|
|
Thanks a ton Dic :lol: |
|
Back to top |
|
|
diwakarsen
New User
Joined: 04 Jul 2007 Posts: 3 Location: india
|
|
|
|
Thanks for the quick response.
But i want to know one thing that what was that value which i mentioned above if it is neither SPACES nor LOW-VALUES. i.e. in hex form
00000
000c0
Please let me know. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
diwakarsen wrote: |
|
What joke happened here ? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
But i want to know one thing that what was that value which i mentioned above if it is neither SPACES nor LOW-VALUES. i.e. in hex form
00000
000c0 |
This value is not a zero -- it's actually invalid COMP-3 data. A valid COMP-3 value of zero would be
From the looks of it, I'd say either the layout is wrong (possibly an error in a copybook?) or the file flat out has invalid data in it. |
|
Back to top |
|
|
|