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
Warnings : 1

Senior Member


Joined: 07 Feb 2009
Posts: 1244
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: 2455
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: 1016
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

Senior Moderator


Joined: 14 Mar 2007
Posts: 10730
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: 8569
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 FILE STATUS - 39 ON VARIABLE LENGTH V... COBOL Programming 2
No new posts Unable to display comp variable COBOL Programming 4
No new posts XML-GENERATE to render edited numeric COBOL Programming 0
No new posts IWS/TWS build dinamic or variable APp... IBM Tools 0
No new posts Determine what library member is in, ... JCL & VSAM 9
Search our Forums:

Back to Top