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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Will s9(5)v99 packed-decimal fits with s9(7) packed-decimal
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    Post subject:
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: 6967
Location: porcelain throne

PostPosted: Wed Aug 20, 2008 4:19 pm    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Aug 22, 2008 4:03 pm    Post subject: Re: Will s9(5)v99 packed-decimal fits with s9(7) packed-deci
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    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 Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Convert Decimal to hexadecimal Steve Ironmonger DFSORT/ICETOOL 5 Fri May 27, 2016 4:19 pm


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