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

How do u debug a S0C7 abend? (aswered till we get the field which caused that) After knowing the field which caused that how do u know the record which caused that if it is in production env? (dumb) Ok let us assume that we got to know that 100th record caused that and I wanted to skip only 100th record from the file and process from 101th. How to do that in JCL using SORT? (tried with STOPAFT but ended up dumb when he said smthing else is ther)

3 Answers   IBM,


) How do u handle errors in BMS macro?

0 Answers   IBM,


ID DIVISION. PROGRAM-ID. PLO. DATA DIVISION. WORKING-STORAGE SECTION. 01 VAR1 PIC 9(2). 01 VAR2 PIC X(2). PROCEDURE DIVISION. ACCEPT VAR2. MOVE VAR2 TO VAR1. STOP RUN. if i give 'PI' in var2 then what will b output of progr. any abend?????

6 Answers   TCS,


I have sequential file recl 1000 i want to add another 15 bytes to it. The record length should not change..How?

1 Answers   CTS, HCL,


What guidelines should be followed to write a structured cobol prgm?

0 Answers  






I hav vari declaration like..... 77 a pic s9(9).99. 77 b pic s9(9).99 comp. 77 c pic s9(9).99 comp-3. if i use MOVE 123456789.99 to a,b,c what happen every one working fine ?

1 Answers   Mphasis,


What are the differences between OS VS COBOL and VS COBOL II?

1 Answers   IBM,


What are the rules of the move verb?

0 Answers  


How may divisions are there in JCL-COBOL?

5 Answers   IBM,


Explain about different table spaces.

0 Answers  


Difference between lrecl, blksize among PS, PDS issues? i.e in jcl at dcb

1 Answers  


How is sign stored in a comp-3 field?

7 Answers  


Categories