how you read control card into array?

Answers were Sorted based on User's Feedback



how you read control card into array?..

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

how you read control card into array?..

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

how you read control card into array?..

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

Post New Answer

More COBOL Interview Questions

Why would you use find and get rather than to obtain?

0 Answers  


What is the difference between PIC 9.99 and PIC9v99?

0 Answers  


consider the following progrm statements MOVE 0 TO SW.NO.OF.REC PERFORM PRI-OUT UNTIL SW=1 DISPALY NO.OF.REC STOP RUN PRE-OUT READ IN-FILE AT END MOVE 1 TO SW WRITE OUO-REC FROM IN-REC ADD 1 TO NO.OF REC if the IN-FILE contains 1000 records what value will be displayedafter the PERFORM is over?assume that N0.OF.REC has PIC 9(4) a.1000 b.1001 c.1 d.none of the above since there is a syntex error

4 Answers   TCS,


how do you reference the printer file formats from cobol programs

0 Answers  


77 I pic 99 value 5 Perorm para-A I times. Para -A. move 10 to I. How many times the para-A will be executed.?

9 Answers   TCS,






i want a program using by if, evaluate , string, unstring, perform, occurs?

1 Answers  


Explain call by context by comparing it to other calls.

1 Answers  


how can i see junk values in dclgen or in hostvariable of comp ?

0 Answers   DELL,


what is record label is empty or standard in file description of data division?

2 Answers   HCL,


if i am reading a file with some 50000 records and moving to a DB2 table and suddenly the program abends in between, is there anyway i could restart from the exact record at which the job failed once the program restarts.

2 Answers   UST,


What kind of error is trapped by on size error option?

0 Answers  


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

0 Answers  


Categories