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

Which Search verb is equivalent to PERFORM…VARYING?

0 Answers  


how to crack cts interview apps? NOVEMBER 21 2010

2 Answers   CTS,


Suppose a program has the following code. What will be the output? MAIN-PARA. DISPLAY 'MAIN-PARA' PERFORM SECTION-A. STOP RUN. SECTION-A. PARA-A1. DISPLAY 'SECTION A PARA A1'. PARA-A2. DISPLAY 'SECTION A PARA A2'.

4 Answers  


) How do u handle errors in BMS macro?

0 Answers   IBM,


What is report-item in COBOL?

0 Answers   Arigo Infotech,






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

1 Answers  


how to code in cobol while using variable block file?

1 Answers  


What are the ways you can generate a copybook?

2 Answers  


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

3 Answers   CGI,


I have a file it contain 10 records.i got abend at 8th record because of soc7.how do you know that perticular record got abend?

3 Answers   IBM,


Can anyone explain me CALL procedure in COBOL.Does it carries similarities like call by reference in C.

1 Answers  


I have a sequential file. How do I access a record in this sequential file randomly in my program ?

8 Answers   CGI, Xansa,


Categories