Multiple choice technology mainframe

DEFINE DATA LOCAL 01 #A (A5) 01 #B (A5) 01 #C (A10) END-DEFINE MOVE 'ABC' TO #A MOVE '012' TO #B COMPRESS #A #B INTO #C LEAVING NO SPACE WRITE #C END What is the value of #C? * S in answer stands for space

  1. ABCSS012SS

  2. ABC012SSSS

  3. ABCSS12SSS

  4. ABC012

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

COMPRESS with LEAVING NO SPACE concatenates values without spaces. #A='ABC' and #B='012' compress into #C (A10). The result is 'ABC012' (6 characters). Since #C is defined as A10, it is right-justified with 4 trailing spaces: 'ABC012 '. Option B shows 'ABC012SSSS' where S represents space, which is correct.