Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

what happens if we wont give timestamp in precompilation process ?

4 Answers   Covansys,


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

0 Answers  


in cobol i have one file it contains records like 10,4,23,98,7,90..... total records 100. iwant 10 to 20 in reverse order in cobol environ ment any one please give the answer......

2 Answers   IBM,


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?

1 Answers   CTS,


How do you set a return code to the JCL from a COBOL program?

4 Answers  






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

1 Answers  


A LESS 1200 IF B GREATER 25 MOVE 47 TOC ELSE MOVE 57 TO C IF A GREATER 249 MOVE 67 TO C ELSE NEXT SENTENCE ELSE IF B LESS 67 MOVE 27 TO C What will be the value of C, when A is 137 and b is 25

3 Answers   TCS,


What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I am going to Display the WS-VARX and WS- VARN?

6 Answers   Xansa,


How to Write the RESTART Logic Using COBOL?

4 Answers   GalaxE, L&T, Syntel, TCS,


How to replace the GOTO statement in COBOL without changing the structure of program. e.g. consider following code... I.D. E.D. D.D. P.D. compute C = A + B. GOTO para 100-display. compute D = C - D. GOTO 200-display. some other logic...... ........ GOTO 300-para. ...... ...... GOTO 400-para. Now I want to replacce all GOTO statements without changing the structure and otput of program.

6 Answers   Accenture,


what is search and searchall?what is the diffrence between them?give an best example?

3 Answers   BirlaSoft,


COMPUTE X = A * B - C * D and COMPUTE X = (A * B) - (C * D) (a) Are not the same (b) Are same (c) Syntactically wrong (d) Will yield a run time error

1 Answers   TCS,






Categories