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
 

 

Problem with the change in the data type.

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

New User


Joined: 27 Mar 2006
Posts: 31

PostPosted: Mon Mar 26, 2007 12:07 pm    Post subject: Problem with the change in the data type.
Reply with quote

Hi All,

Could you please help me to find out the solution of the following problem?

I have one field which is declared as S9(9) COMP,BUT now the declaration has been changed to PACKED-DECIMAL(3,4) so i want to know whether both the fields are compatible. If no then how the truncation will happen.

And how come i avoid this problem.

Regards
Harry
Back to top
View user's profile Send private message

agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 685
Location: Earth

PostPosted: Mon Mar 26, 2007 1:49 pm    Post subject:
Reply with quote

I believe by packed decimal you mean 9(03)V99 COMP-3.
if you try to move S9(09) comp to 9(03)V99 then truncation will occur..(Obviously icon_smile.gif )
How?
Suppose in sending field you have 999999999
and when you move it to receiveng field (Comp3)
It will have value 99.00. (which is not acceptable )

You can declare your variable S9(09)V99 comp-3, if you must use packed decimal.. icon_smile.gif
If this is not what you wanted, give us some more details.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 685
Location: Earth

PostPosted: Mon Mar 26, 2007 1:55 pm    Post subject:
Reply with quote

Quote:
It will have value 99.00. (which is not acceptable )

Instead read 999.00
Back to top
View user's profile Send private message
harry

New User


Joined: 27 Mar 2006
Posts: 31

PostPosted: Mon Mar 26, 2007 2:03 pm    Post subject:
Reply with quote

Hi Sagar,

Thanks for your reply!!

My requirement is to move S9(03)V9(04) COMP-3 TO S9(9) COMP.

Could you please let me know how this will behave by giving any ex.

Regards
Hariom
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 685
Location: Earth

PostPosted: Mon Mar 26, 2007 2:55 pm    Post subject:
Reply with quote

Rule:
Numbers are right justified and alphanumeric fields are left justified.

move S9(03)V9(04) COMP-3 TO S9(9) COMP.

You will lose 9(04) part in the moved variable.
Back to top
View user's profile Send private message
harry

New User


Joined: 27 Mar 2006
Posts: 31

PostPosted: Mon Mar 26, 2007 3:02 pm    Post subject:
Reply with quote

Thanks!!
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 Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm


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