Answered Questions

  • In the example below

    05 WS-VAR1 PIC X(5),05 WS-VAR2 REDEFINES WA-VAR1 PIC 9(5),PROCEDURE DIVISION MOVE 'ABCDE' TO WS-VAR1.Now what is the value of WS-VAR1 and WS-VAR2 ?

    Jeevan Poojar

    • Apr 25th, 2021

    WS_VAR1 - ABCDE
    WS-VAR2 - A CDE

    supriya

    • Sep 5th, 2017

    Here given 05 WS-VAR2 redefines WA-VAR1 pic 9(5). means WA-VAR1 should be defined in working storage so while compiling it will throw the error. but excluding this next statement in procedure division is move abcde to ws-var1. means value of ws-var1 is =abcde