where will u code file status ?

Answers were Sorted based on User's Feedback



where will u code file status ?..

Answer / rahul

ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT file-name ASSIGN TO dd-name.
FILE STATUS IS ws-file-status1.

ws-file-status1 need to define in WORKING STORAGE SECTION
with
PIC X(02)- For QSAM files
PIC X(03) for VSAM files.

Is This Answer Correct ?    10 Yes 0 No

where will u code file status ?..

Answer / rama

we will code file status in file-control of environment
division.
file-control.
SELECT infile ASSIGN TO ws-dd-name
FILE STATUS IS ws-fs-code.

and ws-fs-code has to coded in working-storage section.
if i'm wrong plz let me know...

Is This Answer Correct ?    10 Yes 1 No

Post New Answer

More COBOL Interview Questions

How many variables can be declared in w-s section.?

2 Answers  


COMP?

2 Answers  


How would the number +1234 be stored if a PIC clause of PICTUREs9(4) comp-3 were used?

6 Answers  


Can we use redefine clause in occurs clause?

10 Answers  


Consider the following: 77 A PIC 9(10) 77 B PIC 9(10) 77 C PIC 9(19) MULTIPLY AB BY B GIVING C Which of the following is true ? (a) The execution of the above may result in size error. (b) The execution of the above will result in size error. (c) The definition of C is invalid resulting in compilation error. (d) No error will be thee and the program would proceed correctly.

4 Answers   TCS,






What is the difference between a DYNAMIC and STATIC call in COBOL?

2 Answers  


What are options have been removed in COBOL 11?

1 Answers  


What will happen if you code GO BACK instead of STOP RUN in a stand-alone COBOL program i.e. a program which is not calling any other program ?

3 Answers  


what is scope terminator

2 Answers   IBM,


what is level 66 means??

7 Answers  


what is rediffine clause?in what situation it can use?give me real time example?

1 Answers   IBM,


hi is there any means of deletin a record from a ps usin cobol not using jcl?eg if i am reading a record and if some condition is matched tat particular record must be deletd fom the ps

5 Answers   iNautix,


Categories