How To move a value to an array using move verb?
Answers were Sorted based on User's Feedback
Answer / chandrababu naidu
01 ARRAY.
02 ARRAY2 PIC 99 OCCURS 5 TIMES INDEXED BY I.
PROCEDURE DIVISION.
MOVE LOW-ELEMENT TO ARRAY2 [ I ].
or
MOVE HIGH-ELEMENT TO ARRAY.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / srinivas yadav
MOVE VARIABLE TO ARRAY-ELEMENT.
EX: MOVE A TO WS-ARRAY.
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / pak
move VALUE to array_name(index/subscript)
where VALUE is the data to be input in array.
if the array is indexed use,index or else subscript
Is This Answer Correct ? | 1 Yes | 1 No |
Can anybody give me example of subscript and index
TO abend the data sholud open in which mode? 1.new 2.old 3.mod 4.shr
I have PS flat file with 14 records. I want to read from 4th to 9th record and want to write those 6 records (4th record to 9th record) to another PS file (output file). there is no key defined in the input file. I just want read a certain Consecutive records. can any one please give me the procedure division Coding for this. I have coded the below coding but the READ-PARA is performing only 1 time even though I have 14 records in my input file (i.e FILE-1): PROCEDURE DIVISION. A000-SECTION. MOVE 0 TO I. OPEN INPUT FILE-1. IF CHECK-KEY1 > 0 DISPLAY "OPEN ERROR FOR FILE-1, CODE IS:" CHECK-KEY1 END-IF. OPEN EXTEND NEWFILE-1 IF CHECK-KEY3 > 0 DISPLAY "OPEN ERROR FOR NEWFILE-1 COD IS" CHECK-KEY3 END-IF. PERFORM READ-PARA THRU EXIT-PARA UNTIL EOF-REC = 'YES'. DISPLAY " FINALLY OUT OF LOOP" CLOSE FILE-1 CLOSE NEWFILE-1 STOP RUN. READ-PARA. ADD 1 TO I READ FILE-1 AT END MOVE 'YES' TO EOF-REC IF I > 3 AND < 10 PERFORM WRITE-PARA ELSE DISPLAY "NOT IN RANGE" END-IF. EXIT-PARA. EXIT. WRITE-PARA. WRITE NEW-REC FROM FILE1-REC.
What is the difference between Perform para and perform asaection in cobol?
what is s013u000 for?
wht do u mean by (*,intrdr) wht is * used for ?
Is it possible to mutliply a comp variable with an comp-3 variable. Will there be any error if i do it?
db2 variable decimal(15,2) what is the equalent size of cobol variable
level number 77 is used to define a)group data b)elementary data c)redefine d)none
i want a program using by if, evaluate , string, unstring, perform, occurs?
Can anyone tell me how to handle the array beyond the limit. If we have an array or a table which can handle 5000 records but now we have to compensate 20000 records with the same array? how to handle the situation.
what is the difference between start and startbr?