Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us