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

example for sub strings ? and refernce modifications whit output pls

0 Answers   College School Exams Tests, IBM,


how to convert the recors form vsam file to db2 table tru file aid

0 Answers   TCS,


Name the divisions, which are available in a cobol program?

0 Answers  


Explain the difference between an internal and an external sort, the pros and cons, internal sort syntax etc.

3 Answers  


What is sqlca and why is it needed in any cobol-db2 program?

1 Answers  






how do you reference the variable block file formats from cobol programs

0 Answers  


01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i need to get the miuns sign in the result?

7 Answers  


Write the syntax of a two dimensional array?

8 Answers   Honeywell, Xansa,


i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?

0 Answers  


give the examples for strings and unstrings in cobol

2 Answers   IBM,


What is difference between static and dynamic call in cobol?

0 Answers  


Can printer files (having 133 characters) be of variable length?

3 Answers  


Categories