Logo 
Search:

Cobol Articles

Submit Article
Home » Articles » Cobol » Homework HelpRSS Feeds

Program to use move clause for numeric values from source to destination after converting it into alphanumeric

Posted By: Evie Brown     Category: Cobol     Views: 4254

Program to use move clause for numeric values from source to destination after converting it into alphanumeric.

Code for Program to use move clause for numeric values from source to destination after converting it into alphanumeric in Cobol

       IDENTIFICATION DIVISION. 
       PROGRAM-ID. decmove.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01 src PIC x(6) value"123.45".
       01 dest PIC 9(3)v99 value 123.45.

       PROCEDURE DIVISION.
       movedec.
           
           MOVE src TO dest.
           DISPLAY "MOVE SOURCE TO DESTINATION".
           DISPLAY "SOURCE " src.
           DISPLAY "DESTINATION " dest.
           
           MOVE 123.45 TO dest.
           MOVE dest TO src.
           DISPLAY "MOVE DESTINATION TO SOURCE".
           DISPLAY "SOURCE " src.
           DISPLAY "DESTINATION " dest.

           STOP RUN.  
           
*****************************************************************
MOVE SOURCE TO DESTINATION
SOURCE 123.45
DESTINATION 123.45


MOVE DESTINATION TO SOURCE
SOURCE 0
DESTINATION 123.45

*****************************************************************
  
Share: 



Evie Brown
Evie Brown author of Program to use move clause for numeric values from source to destination after converting it into alphanumeric is from London, United Kingdom.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!