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

Move from Comp3 variable to Edited Variable


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Revathy.nair0485

New User


Joined: 02 Nov 2017
Posts: 3
Location: India

PostPosted: Fri Nov 03, 2017 3:30 pm
Reply with quote

I am trying to move a PD value to numeric edited field . Below the details

Declaration

Input field- EAP-TOTAL-COMMITTED PICTURE S9(11)V99 COMP-3.
Output field--EAPOUT-TOTAL-COMMITTED PIC S9(11)V99

Code in Procedure division

IF EAP-TOTAL-COMMITTED IS NUMERIC
MOVE EAP-TOTAL-COMMITTED TO EAPOUT-TOTAL-COMMITTED

Few Values in the PD field has the last sign nibble as ‘A’(in hex representation) .These values are not considered as numeric in my program.

I tried NUMPROC(PFD and NO PFD options). But no luck

Thanks

Can any one help me on this.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1315
Location: Vilnius, Lithuania

PostPosted: Fri Nov 03, 2017 3:49 pm
Reply with quote

Why do you attach a 350kb PDF to your question?
Back to top
View user's profile Send private message
Revathy.nair0485

New User


Joined: 02 Nov 2017
Posts: 3
Location: India

PostPosted: Fri Nov 03, 2017 4:12 pm
Reply with quote

PDF doc has the I/p file screen shot
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Fri Nov 03, 2017 4:44 pm
Reply with quote

A simple cut'n'paste would do much better. Most people do not/cannot view attachments for security purposes. I don't a) for security reasons and b) because why should i do the extra work to look at it. It is not me wanting help but you - so help the helpers.

When posting code/data or anything else requiring a fixed pitch font then use the code tags. If you do not know what these are then search the forum.
Back to top
View user's profile Send private message
Revathy.nair0485

New User


Joined: 02 Nov 2017
Posts: 3
Location: India

PostPosted: Fri Nov 03, 2017 5:00 pm
Reply with quote

Code:
EAP-TOTAL-COMMITTED
                #18
           PD 101:7
    <---+----1---->
****  Top of data  *
     26830042620.76
            2804606
            630227C
                   
       410176211.44
            0407214
            011614A
                   
    ***************
            2280408
            1620316
 ===>               
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1050
Location: Richmond, Virginia

PostPosted: Fri Nov 03, 2017 7:10 pm
Reply with quote

Your "output" field has an assumed decimal point - the "V".
Don't you want to see a period (.) here?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Fri Nov 03, 2017 7:19 pm
Reply with quote

Quote:
I am trying to move a PD value to numeric edited field


I do not speak too much cobolese, but the output PIC does not look like a PIC for an edited field

might as well lock the topic icon_cool.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Fri Nov 03, 2017 7:22 pm
Reply with quote

Depending upon which version of Enterprise COBOL you are using, compile options NUMCLS(ALT) and NUMPROC(NOPFD) may do what you want but they must be used together.

Also, you are moving to a numeric variable, NOT a numeric-edited variable. There are some very significant differences in the two, and you should learn those differences.
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 REXX/CMS How to place command console... CLIST & REXX 4
No new posts CA7 count with DATE variable CA Products 0
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
Search our Forums:

Back to Top