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

Will s9(5)v99 packed-decimal fits with s9(7) packed-decimal


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

New User


Joined: 10 Feb 2008
Posts: 1
Location: Chennai

PostPosted: Wed Aug 20, 2008 12:37 pm
Reply with quote

If my input data is in s9(5)v99 packed-decimal
but in program i declared it as s9(7) packed-decimal
will it accept ?
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Wed Aug 20, 2008 2:49 pm
Reply with quote

You will lose the decimal part.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 20, 2008 4:19 pm
Reply with quote

divide s9(7)-field by 100 giving s9(5)v99-field.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Fri Aug 22, 2008 4:03 pm
Reply with quote

Redefine the PIC S9(07) PACKED-DECIMAL field as PIC S9(05)V99 PACKED-DECIMAL and perform a straight move.

Then, all will be forgiven.... icon_wink.gif

Bill
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
No new posts Need Help with Packed Decimal Signs DFSORT/ICETOOL 4
No new posts Select a DB2 value in a specific deci... DB2 4
Search our Forums:

Back to Top