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

conversion of non packed to packed


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

New User


Joined: 13 Feb 2008
Posts: 9
Location: hyderabad

PostPosted: Thu Feb 28, 2008 9:41 am
Reply with quote

Hi

i would like to move non packed numeric data to packed numeric data in cobol

Could you please let me know the conversion how to move
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Thu Feb 28, 2008 9:48 am
Reply with quote

Declare correct PIC clause for packed decimal format and move the numeric field to Packed Numeric field.
Back to top
View user's profile Send private message
praveen_kandrakota

New User


Joined: 13 Feb 2008
Posts: 9
Location: hyderabad

PostPosted: Thu Feb 28, 2008 11:14 am
Reply with quote

i would like to move non packed numeric data 9 (09) to packed numeric s9(09) data in cobol

please let us the conversion in COBOL program
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Feb 28, 2008 1:31 pm
Reply with quote

praveen_kandrakota,

it is no wonder that you have questions. you never listen to the answers.
each post in this thread has provided you the answer.

05 field-a pic 9(9).
05 field-b pic s9(9) packed-decimal.


move field-a to field-b.

if you would bother to read the documentation, you would know that cobol will effect conversion when you MOVE one type of numeric to another.
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 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
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 file manager is doing string conversion IBM Tools 3
Search our Forums:

Back to Top