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
 

 

Issue with moving zeroes to COMP-3

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

New User


Joined: 13 Nov 2006
Posts: 10

PostPosted: Tue Dec 16, 2008 8:43 am    Post subject: Issue with moving zeroes to COMP-3
Reply with quote

Hi,

I am having a set of fields defined as PIC S9(9)V99 COMP-3 and my requirement is to move zeroes to it. I am using MOVE ZEROES TO FIELD
in the code. The issue is that the value comming in this field is like X'000000000000' and the sign byte at the end is not comming. Due to this when I am loading this to table, its being discarded.

Strange part is that this issue comes up only for the first time and the next iterations of the same code gets the correct value like X'00000000000C'.

Is there anything I am doing wrong. Pls suggest.

Thanks
CB
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: Tue Dec 16, 2008 8:46 am    Post subject:
Reply with quote

Hello,

It sounds like the MOVE is not being executed on the first time thru. . .

If the MOVE ZEROS was executed, there would always be a valid sign (unless something later in the code was moved there).
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Wed Dec 17, 2008 1:14 am    Post subject:
Reply with quote

As Dick alluded to, there's a good possibility your 1st MOVE is not being executed. A hint of this is that the COMP-3 field is LOW-VALUES which is what it would be if not initialized or populated.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Dec 17, 2008 3:58 am    Post subject: Re: Issue with moving zeroes to COMP-3
Reply with quote

Here's something that you should never do -

Code:

03  WS-PACKED-GROUP.
    05  WS-PACKED-01 PIC S9(07) COMP-3.
    05  WS-PACKED-02 PIC S9(07) COMP-3.
    05  WS-PACKED-03 PIC S9(07) COMP-3.

MOVE ZERO TO WS-PACKED-GROUP.

When you move ZERO/ZEROS/ZEROES to a group level which contains elementary COMP-3 fields (in this example) 12-Bytes of Display-Numeric ZERO (X'F0') is moved to all three fields, which will eventually cause a S0C7 Data Exception.

HTH....

Regards,

Bill
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed Dec 17, 2008 6:02 am    Post subject:
Reply with quote

LE has a storage option to initialize memory to LOW-VALUES. If this is set at your shop, then your first MOVE isn't happening for some reason. What is the exact code you're using and the field(s) involved -- post them in BBCode format, please?
Back to top
View user's profile Send private message
candyboy

New User


Joined: 13 Nov 2006
Posts: 10

PostPosted: Wed Dec 17, 2008 8:15 am    Post subject: Reply to: Issue with moving zeroes to COMP-3
Reply with quote

Thanks guys!!

Based on the replies, we went through the code once more and figured out that infact the MOVE was not getting executed for the first time leading to the issue. Same has been corrected now.

That being said, all your replies have been a good source of learning for me. Thnx again

CB.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed Dec 17, 2008 8:39 am    Post subject:
Reply with quote

Glad to hear it is resolved!
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: Wed Dec 17, 2008 8:51 am    Post subject: Reply to: Issue with moving zeroes to COMP-3
Reply with quote

Good to hear it is working - thank you for letting us know icon_smile.gif

d
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 Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
No new posts DFHRESPONSE returns issue divated CICS 3 Wed Nov 02, 2016 6:32 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm


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