Let's understand Mainframe
Home Tutorials Interview Q&A Quiz Mainframe Memes Contact us About us

Module 6: Procedure Division


  • MOVE statement's sending or receiving fields can be either elementary item or group item. When both the send and receive fields are elementary items, the movement of data is known as the elementary move. When either or both of the fields are a group item, the movement of the data is known as group move.
  • When MOVE statement is used to move information at group level, the movement of data takes place as if both sending and receiving fields are specified as alphanumeric items. This is regardless of the description of the items constituting the group item.
  • Example:-
    • Let’s assume data declaration in DATA DIVISION is,

      01 EMP-REC-1. 05 E1 PIC 999. 05 E2 PIC 999V9. 05 E3 PIC XXXXXX. 05 E4 PIC 999. 01 EMP-REC-2. 05 E1 PIC ZZZ. 05 D1 PIC 999.9. 05 E3 PIC XXXBXX. 05 D4 PIC ZZZ.

    • Assume currently data in EMP-REC-1 and EMP-REC-2 is as follows
    • After the execution of below statement,
      The EMP-REC-1 will remain unchanged whereas EMP-REC-2 will have data shown below:-
    • It must be noted that, no editing has been performed. Moreover, EMP-REC-1 being shorter than EMP-REC-2 in terms of size, as per the rules for alphanumeric data movement, the extra positions in the right-hand side of EMP-REC-2 are filled with spaces.

© copyright mainframebug.com
Privacy Policy