how to code in cobol while using variable block file?



how to code in cobol while using variable block file?..

Answer / ravi

INDENTIFICATION DIVISION.
PROGRAM-ID. PGM1.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM
OBJECT-COMPUTER. IBM
INPUT-OUTPUT SECTION.
FILE CONTROL.
SELECT INPUT-VB-FILE ASSIGN TO DISK.
DATA DIVISION.
FILE-SECTION.
FD INPUT-VB-FILE
01 INPUT-VB-FILE
RECORDING MODE IS V
RECORD CONTAINS 1000 CHARACTERS <---This should be the max
size of the record in whole file.
BLOCK CONTAINS 0 RECORDS.

Is This Answer Correct ?    2 Yes 8 No

Post New Answer

More COBOL Interview Questions

Can we move SPACES to numeric field and ZEROES to alphabetic field? If yes what are the way doing this?

6 Answers   T systems,


What is the different between index and subscript?

3 Answers  


What are the situations u have used in ur project for Subcript and Index ? 1.if u use Subscript why not Index,why u choose Subscript only? 2.if u use Index why not Subscript,what abt Displacement?

2 Answers   Cap Gemini,


IDENTIFICATION DIVISION. PROGRAM-ID. MOVEPGM. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-I PIC 9(2). PROCEDURE DIVISION. A1000-MAIN-PARA. PERFORM PARA-X WITH TEST BEFORE UNTIL WS-I= 5 STOP RUN. PARA-X. DISPLAY "BEST2". I m getting error s722,while executing the program, seems getting in loop, can anybody tell me why

3 Answers  


SIGN TRAILING SEPARATE field occupy ?

3 Answers  






How to resolve the soc4 & soc7 other than following answers. Soc4 can resolved using mispleed dd name and dd name is not matching with file and soc7 check the sysdump and copy the offest address then correct it in the program.

10 Answers   ADP, Amdocs, Cap Gemini, Keane India Ltd, Super Value, TCS,


what happens when a copybook variables are declared using include statement ?

3 Answers   IBM,


How to execute a set of JCL statements from a COBOL program?

2 Answers   Patni, Syntel,


How to read records from flat file in reverse order through COBOL program?

14 Answers   Accenture, Broadridge, IBM, MAT, Polaris, SPIC, Syntel, TCS, Wipro,


Which division and paragraphs are mandatory for a COBOL program?

0 Answers  


what are the limitations of Inline Perform?

3 Answers   Zensar,


How do you submit JCL via a Cobol program?

5 Answers   IBM,


Categories