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 |
how many times PARA-A is performed : PERFORM PARA-A VARYING TIMES-COUNTER FROM 1 BY 1 UNTIL TIMES-COUNTER >0 PARA-A MOVE P TO Q MOVE H TO TIMES COUNTER a.10 b.1 c.11 d.0
Explain fixed length record in cobol? with suitable example
I encountered an error when I move spaces to a numeric field?What should I do to move spaces on that field?help please.
01 a pic 9(9v99) 01 b pic 9(9.99) wht will be the stored vales in both cases
What is the default value(s) for an initialize and what keyword allows for an override of the default?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
I have put two write operations in a single para for two different conditions.Will that lead to an abend or run successfully and write two records?
Write down the divisions of cobol program?
What is different between variable length and fixed length?
What is the difference between binary search and sequential search?
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
Why occurs can not be used in 01 level ?