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
 

 

Issue about add COMP-3 with non-integer numeric data

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

New User


Joined: 09 Oct 2006
Posts: 36

PostPosted: Thu Sep 13, 2007 4:22 pm    Post subject: Issue about add COMP-3 with non-integer numeric data
Reply with quote

Hi All,
format is like:
Code:
A X(8)
B S(9)V9(3) USAGE IS DISPLAY
C S9(12)V9(3) USAGE IS COMP-3

I want move A to B and accumulate B with C, the results are to be stored in C.
confusing about this kind of operation...

Thanks,
Coria Xu
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Sep 13, 2007 4:39 pm    Post subject:
Reply with quote

Would you like to reconsider the PIC for B?
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 757
Location: Germany

PostPosted: Thu Sep 13, 2007 5:00 pm    Post subject:
Reply with quote

Hi !

Using PIC-X is a little bit dangerous for the afterwards computation.
So field A could be something like "123A9G"

Regards, Umeysan
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 276
Location: Bang,iflex

PostPosted: Wed Sep 26, 2007 1:15 pm    Post subject: Hi All.......
Reply with quote

Check and validate the variable A for numeric, if it is numeric move that variable in to working-storage variable, having pic 9(8), take thi variable and then move it to Variable B which is mentioned above. since its stored in numeric EBCIDIC format, we can use that variable for COMP or COMP-3 variables.

Let me knw more info from Cria..

Thanks,
Vasanth......... icon_smile.gif
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 Paasing symbolic parameter to instrea... Anirudh Anand JCL & VSAM 0 Thu Jul 27, 2017 1:22 pm
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts Passing data from REXX to C programme... chong.zhou All Other Mainframe Topics 0 Wed Jul 26, 2017 4:55 pm
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 8 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm


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