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
 
Move from Comp3 variable to Edited Variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Move from Comp3 variable to Edited Variable
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: 1067
Location: Oostende, Belgium

PostPosted: Fri Nov 03, 2017 3:49 pm    Post subject:
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    Post subject: Reply to: Move from Comp3 variable to Edited Variable
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: 1922
Location: UK

PostPosted: Fri Nov 03, 2017 4:44 pm    Post subject:
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    Post subject:
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

Active Member


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

PostPosted: Fri Nov 03, 2017 7:10 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10350
Location: italy

PostPosted: Fri Nov 03, 2017 7:19 pm    Post subject: Reply to: Move from Comp3 variable to Edited Variable
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: 8187
Location: East Dubuque, Illinois, USA

PostPosted: Fri Nov 03, 2017 7:22 pm    Post subject: Reply to: Move from Comp3 variable to Edited Variable
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    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 how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am
This topic is locked: you cannot edit posts or make replies. Can a alphanumeric data be moved to a... nico_neoz COBOL Programming 10 Mon Oct 30, 2017 8:28 am
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm

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