Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Getting SOC7 in Comp3 field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
diwakarsen

New User


Joined: 04 Jul 2007
Posts: 3
Location: india

PostPosted: Fri Dec 12, 2008 10:43 am    Post subject: Getting SOC7 in Comp3 field
Reply with quote

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
View user's profile Send private message

dick scherrer

Site Director


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

PostPosted: Fri Dec 12, 2008 11:16 am    Post subject:
Reply with quote

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
View user's profile Send private message
diwakarsen

New User


Joined: 04 Jul 2007
Posts: 3
Location: india

PostPosted: Fri Dec 12, 2008 11:51 am    Post subject: Reply to: Getting SOC7 in Comp3 field
Reply with quote

Thanks a ton Dic :lol:
Back to top
View user's profile Send private message
diwakarsen

New User


Joined: 04 Jul 2007
Posts: 3
Location: india

PostPosted: Fri Dec 12, 2008 12:38 pm    Post subject: Reply to: Getting SOC7 in Comp3 field
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Dec 12, 2008 12:44 pm    Post subject: Re: Reply to: Getting SOC7 in Comp3 field
Reply with quote

diwakarsen wrote:
icon_lol.gif
What joke happened here ?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8055
Location: East Dubuque, Illinois, USA

PostPosted: Fri Dec 12, 2008 5:59 pm    Post subject:
Reply with quote

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
Code:
00000
0000C
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
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 READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us