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
 
MOVING COMP-3 into binary

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

New User


Joined: 20 May 2010
Posts: 75
Location: India

PostPosted: Tue Dec 01, 2015 5:02 pm    Post subject: MOVING COMP-3 into binary
Reply with quote

Hi i have a field movement as below

Field-a S9(17) COMP-3 value zeroes.
Field-b s9(7) BINARY.

MOVE FIELD-A to FIELD-B

BUT i am not getting the values inside field-B instead i get a value +12345 moved into that...

can anyone help
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Tue Dec 01, 2015 6:38 pm    Post subject: Reply to: MOVING COMP-3 into binary
Reply with quote

The data in FIELD-A is being changed in between the definition and the MOVE.

It is a really bad idea to attempt truncation with a MOVE to a binary field. If you need the truncation, MOVE the PACKED-DECIMAL/COMP-3 field to one which is defined in the same way and only has seven digits.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2165
Location: NY,USA

PostPosted: Tue Dec 01, 2015 10:20 pm    Post subject:
Reply with quote

You have not told us what is being passed and just saying what you get output won't help; Secondly, you need to search over to this forum to get similar links for the discussion which can help you by yourself like this
or this
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 S9(11)V9(02) to S9(9)V9(2) COMP-3 sprikitik SYNCSORT 2 Tue Oct 23, 2018 6:19 pm
No new posts Comp interview questions Deepak1518780 Mainframe Interview Questions 5 Sat Sep 22, 2018 7:26 pm
No new posts Replace comp-3 field value to comp-3 ... dharmaraok DFSORT/ICETOOL 5 Fri Sep 14, 2018 3:46 pm
No new posts How can we create a flat file in JAVA... jasorn Java & MQSeries 2 Wed Aug 08, 2018 3:08 pm
No new posts Comparing Comp-3 fields with greater ... Prateeksichem1 DFSORT/ICETOOL 11 Fri Jul 13, 2018 8:45 am

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