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

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


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 2146
Location: At my coffee table

PostPosted: Thu Sep 13, 2007 4:39 pm
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: 771
Location: Germany

PostPosted: Thu Sep 13, 2007 5:00 pm
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: 275
Location: Bang,iflex

PostPosted: Wed Sep 26, 2007 1:15 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top