how you read control card into array?
Answers were Sorted based on User's Feedback
Answer / shwetha
Consider the Controll Card(Sysin) as an infile to the
program.
JS010 EXEC PGM=pgm,
REGION=0M
STEPLIB DD DSN=Loadlib,
DISP=(SHR,KEEP,KEEP)
INFILE DD DSN=xxxx.xxxx.SYSIN(control card),
DISP=(SHR,KEEP,KEEP)
(Where xxxx.xxxx.SYSIN -Sysin PDS)
Read it as an infile and download it to the Table defined
in your Program.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / kssb78
Yes Shweta is correct.
The alternate way to execute is to read the inputs in
control card DD statement SYSIN is using a ACCEPT statement
and move it into a working storage variable
Later using a subscript / index we can move the value into
an array.
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / lu
I don't understand your question ???? give an example...
Array is a table using by subscript...
| Is This Answer Correct ? | 0 Yes | 2 No |
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
I have 2 dimensional array with having 100 elements. So how to find the 11th item in an array?
IDENTIFICATION DIVISION. PROGRAM-ID. MOVEPGM. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-I PIC 9(2). PROCEDURE DIVISION. A1000-MAIN-PARA. PERFORM PARA-X WITH TEST BEFORE UNTIL WS-I= 5 STOP RUN. PARA-X. DISPLAY "BEST2". I m getting error s722,while executing the program, seems getting in loop, can anybody tell me why
what is the difference between perform varying and perform until
What is a report item?
Can we redefine the field of x(200) to less than 200?
What is the difference between CALL BY VALUE and CALL BY CONTENT?
whats the disadvantage of search all over search?
i have variable record in the 5th, i want to sort from 5th filed ? how ?
What are the differences between OS VS COBOL and VS COBOL II?
I have a COBOL main program which is calling sub program, the number of calling parameters used in main program are 4 whereas in sub program it's 5. Sub program is passing 5 parameters back to main program Will there be any compilation error? Or main program parameters displays junk values?
can I copy book which contain db2 statment in procedure divion?