how to code in cobol while using variable block file?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to enter and display the names of students in a class using the occurs clause.

654


Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

5065


What are the various section in data division and briefly explain them.

699


if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.

5693


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

631






How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?

710


How do you differentiate between cobol and cobol-ii?

656


How do we get current date from system with century in COBOL?

806


Write the code to count the sum of n natural numbers.

701


input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?

1876


For rewrite, why is it mandatory that file needs to be opened?

623


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

1806


What is report-item in COBOL?

711


What are INPUT PROCEDURE and OUTPUT PROCEDURE?

690


What is rmode(24)

680