IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

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

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> Mainframe COBOL
View previous topic :: View next topic  
Author Message
dhamuv



Joined: 10 Feb 2008
Posts: 1
Location: Chennai

Posted: Wed Aug 20, 2008 12:37 pm    Post subject: Will s9(5)v99 packed-decimal fits with s9(7) packed-decimal  

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  
Srihari Gonugunta



Joined: 14 Sep 2007
Posts: 184
Location: Pune

Posted: Wed Aug 20, 2008 2:49 pm    Post subject:  

You will lose the decimal part.
Back to top  
dbzTHEdinosauer



Joined: 20 Oct 2006
Posts: 1639
Location: germany

Posted: Wed Aug 20, 2008 4:19 pm    Post subject:  

divide s9(7)-field by 100 giving s9(5)v99-field.
Back to top  
Bill O'Boyle



Joined: 14 Jan 2008
Posts: 345
Location: Orlando, FL, USA

Posted: Fri Aug 22, 2008 4:03 pm    Post subject: Re: Will s9(5)v99 packed-decimal fits with s9(7) packed-deci  

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.... :wink:

Bill
Back to top  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> Mainframe COBOL
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM