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 do you reference the following file formats from cobol programs?

0 Answers  


what is the difference between Plan & package?

1 Answers   IBM,


Extract only those records from a PS file which are having word 'TEXT' in the records using COBOL? The word TEXT is not present in a particular position in all the records.

2 Answers   RBS,


How will 128 be saved in s9 (3) comp-3 How will 12 be saved in s9 (2) comp

3 Answers   CTS,


How to read a 100 record from a file through cobol?

2 Answers  






Explain what you understand by passing by value.

0 Answers  


Which division and paragraphs are mandatory for a COBOL program?

0 Answers  


What do you understand by passing by reference and passing by content?

1 Answers  


How to delete a front spaces in a data-name/variable in cobol Example:- 01 data-name-1 PIC x(20) value " cobol language". 01 data-name-2 PIC x(20). MOVE data-name-1 to data-name-2. would like the value of data-name-2 is "cobol language".

3 Answers  


Hi Devolopers.. i need ur help.. i have 3 years of exp in Manual testing and SQL, next month onwards i shifted in to MAINFRAME TESTING... i have ZERO Knowledge abt mainframes.... PLS SUGGEST ME WHAT I LEARN in AMEERPET? mainframe testing or mainframe total devolopment subject... AS a devoloper u know every thing tester what to do PLSSSSSSSSS help me ITS VERY URGENT...

1 Answers  


Is It Possible to Update or change in VIEW Mode?

5 Answers   CSC,


how can we fetch 3 records in cobol pgm any coding pls ?

3 Answers   CGI,


Categories