01 xxx pic 9(4).
01 yyy pic 9(6).
move 123456 into yyy.
move yyy to xxx.
display yyy.
what would be the value of yyy
Answers were Sorted based on User's Feedback
Answer / jaganmohanreddy
HAI ALL U R WRITING DIFFERENT ANSWERS BUT THEY ARE ASKING
FOR YYY VALUE IT WONT BE CHANGED IT HAS VALUE OF 123456
BECAUSE ITS PIC CLAUSE IS 9(6) OK THEN DISPLAY YYY IT WIL
DISPLAY 123456 OK ANY DOUBTS
Is This Answer Correct ? | 55 Yes | 3 No |
Answer / gangadhara.m
numeric number alingment is right to left
truncation is done in left side
the datatype size of y is 6
so value of y is 123456
Is This Answer Correct ? | 8 Yes | 2 No |
Answer / mahaveer
Here if u display YYY it will 123456
and if u display xxx it will 3456
Hope its clear
Is This Answer Correct ? | 4 Yes | 0 No |
Is this allowed? 01 WS-TABLE. 03 FILLER-X PIC X(5) VALUE 'AAAAA'. 03 WS-EX REDEFINES FILLER-X OCCURS 5 TIMES PIC X(1). can redefines clause be used with occurs clause?
what is the difference between Normal vaiable and comp variable.
SIGN TRAILING SEPARATE field occupy ?
What is the size of s9(19)comp3? explain
a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B giving d. what is ur declaration for c,d?
How do u sort the table for Search ALL? Is it only using ASCENDING KEY IS statement in occurs clause? If the data is input in non ascending order, will the ASC KEY IS automatically sort the data? or will it throw compile time error?
What is XDC ?
how to display date in reverse order if the pic clause of the is numeric suppose date is 09032010 ==> need to print in 20100309 (pic clause is numeric)
if a=b how the flow will complete??? perform test through test-exit. perform activa through activa-exit. test. if a=b then next sentence else move a to c. test-exit. exit. activa. -- -- activa-exit. exit.
WT R TECHNICAL MAINFRAME QUESTION ASKED IIN ANJANASOFTEARE??
how to know that the file has 300 records how to acess it?
Will the variable POS in the following code have a value of 2 or not? 01 POS PIC S9(4) COMP VALUE 2. 01 FIRST-NAME PIC X(10) VALUE 'ABC'. 01 LAST-NAME PIC X(10) VALUE 'XYZ'. 01 NAME PIC X(20) VALUE SPACES. STRING FIRST-NAME DELIMITED BY SPACES ' ' DELIMITED BY SIZE LAST-NAME DELIMITED BY SPACES INTO NAME WITH POINTER POS