I have a sequential file of 100 records. How do I load the
records into a two dimensional array ?
Answer Posted / ameet
The answer for this is as below:
01 INPUT-REC.
02 REC-DETAIL OCCURS 100 TIMES INDEXED BY I.
03 REC-DATA PIC X(10 ) - assume
PROCEDURE DIVISION.
READ FILE(INPUT) INTO(WORK-REC) - assume length as 100
SET I TO 1.
PERFORM 1000-WRITE 100 TIMES
STOP RUN.
1000-SECTION.
MOVE WORK-REC TO REC-DATA(I).
SET I UP BY 1.
READ FILE(INPUT) INTO(WORK-REC).
Is This Answer Correct ? | 2 Yes | 16 No |
Post New Answer View All Answers
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
Explain the configuration section of a cobol program with examples of syntax.
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
HOw can I get the negative sign while deduct high value from low value
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
what is amode(24), amode(31), rmode(24) and rmode(any)?
What are the rules of the move verb?
How you can characterize tables in cobol?
how do you reference the esds vsam file formats from cobol programs
Differentiate between structured cobol programming and object-oriented cobol programming.
Define cobol?
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
what is the difference between COBOL2 AND COBOL390?