In the Environment Division:
Configuration Section is an optional section in which you can:
The Configuration Section can only appear in the outermost program of a nested program structure. The Configuration Section contains the following paragraphs.
Set Status Indicators
User Programmable Status Indicator (UPSI) switches were used on older computers for processing special conditions at run time. Although this method is still supported, two alternative methods of passing status information are:
Specify the Collating Sequence
Using the PROGRAM COLLATING SEQUENCE clause and the ALPHABET clause, you can establish the collating sequence used in the following operations:
The sequences used can be based on one of these alphabets:
Each separate SORT or MERGE operation can override the alphabet specified in the PROGRAM COLLATING SEQUENCE clause.
Specify Symbolic Characters
By using the SYMBOLIC CHARACTER clause, you can give symbolic names to any character of the specified alphabet. For example, to give a name to the backspace character (X'16' in the EBCDIC alphabet) you would code:
SYMBOLIC CHARACTERS BACKSPACE IS 23
You use ordinal position to identify the character; position 1 corresponds to character X'OO'.
Specify a User-Defined Class
By using the CLASS clause, you can give a name to a set of characters listed in the clause. For example, name the set of digits by coding: -
CLASS DIGIT IS "0" THROUGH »S«."
The class name can only be referenced in a class condition.
You will identify all your files in the Input-Output Section:
For CICS and online IMS message processing programs (MPP), code only the Environment Division header and, optionally, the Configuration Section. CICS does not allow COBOL definition of files; IMS allows COBOL definition of files only for batch programs.
You describe Each File in the FILE-CONTROL paragraph. The following is a FILE-CONTROL entry for a QSAM file:
For all files that you process in your VS COBOL II program, you need to code DD statements (JCL) or ALLOCATE commands (TSO) that define the files to the operating system. The following listing illustrates the relationship between then JCL DD statement and the FILE-CONTROL and FD entries in your program.
JCL DD Statement:
In the FILE-CONTROL paragraph, your ASSIGN clause name can include an 'S-' before the ddname to document that the file is a QSAM file as shown below:
ASSIGN TO [label-] S-name
The ASSIGN clause is required for QSAM files. The ORGANIZATION clause is optional. QSAM files always have sequential organization, and ORGANIZATION IS SEQUENTIAL is the default. The SAME clause in the l-O-CONTROL paragraph is treated as a comment in QSAM. The SAME RECORD AREA clause indicates that two or more files use the same main storage area for processing the current logical record. Do not specify this clause if you have used RECORD CONTAINS 0 CHARACTERS.
In the FILE-CONTROL paragraph, the ASSIGN clause for VSAM sequential files is slightly different from the clause for indexed or relative files:
The ASSIGN clause is required for VSAM files. For VSAM indexed and relative files, the ORGANIZATION clause is required. The ORGANIZATION clause for VSAM files can be:
The SAME RECORD AREA clause indicates that two or more files use the same main storage area for processing the current logical record. The SAME clause is treated as the SAME RECORD AREA clause. For a VSAM indexed file, your RECORD KEY definition must agree with the definition in the catalog entry. If you are using VSAM indexed files with alternate indexes, your ALTERNATE RECORD KEY definitions must agree with the definitions you have made in the catalog entry. Any password entries you have cataloged should be coded directly after the ALTERNATE RECORD KEY phrase. Specify WITH DUPLICATES only if your alternate index was cataloged as having duplicate keys. You cannot change your strategy here in your COBOL program, unless you have already taken care of the catalog entries.
Using the FILE STATUS clause, you can set up error-handling procedures for use when a nonzero file status code is returned. Coding the FILE STATUS clause for each defined file and coding a test for the file status key value after each I/O statement is strongly recommended. For VSAM files, you can use a second data-name in the FILE STATUS clause to get VSAM return code, component code and reason code information. Both data-names must be defined in the Data Division.
The file-name you specify in your SELECT sentence is used as a constant throughout your COBOL program, while the name of the file (also called dataset) on the DD statement can be associated with a different file at execution.
Changing a file-name in your COBOL program requires changing input/output statements and recompiling the program. In contrast, you can change the DSNAME in the DD statement at execution. As an example, consider a COBOL program that might be used in exactly the same way for several different master files. It contains this SELECT sentence:
The three possible input files are MASTER!, MASTER2, and MASTER3. Therefore, one of the following DD statements is coded in the job step that calls for program execution:
Any reference within the program to MASTERA is a reference to the file assigned to DSNAME. The ddname-portion of the assignment-name that appears in the ASSIGN clause and the ddname of the DD statement must always be the same. You can vary the file itself in the DSNAME given in the DD statement. The file-name that follows the SELECT statement (in the example MASTER) must "be the same as the FD filename entry.
The APPLY WRITE-ONLY clause makes optimum use of buffer and device space when creating a sequential file with blocked V-mode records. With APPLY WRITE-ONLY, a buffer is truncated only when the next record does not fit in the unused remainder of we buffer, allowing for a performance savings since this will generally result in a reduction of the number of l/O's to the output device. Also note that the AWO compiler option has the effect of putting the APPLY WRITE-ONLY clause on all eligible files. The NOAWO compiler option does not affect files for which the APPLY WRITE-ONLY clause has been specified.
Without APPLY WRITE-ONLY, a buffer is truncated when there is not enough space remaining in it to accommodate the maximum size record. This clause has meaning only when the file is opened as OUTPUT or EXTEND and has standard sequential organization.
IBM Mainframe Related Interview Questions
|IBM Lotus Notes Interview Questions||IBM-CICS Interview Questions|
|COBOL Interview Questions||Linux Interview Questions|
|IBM-JCL Interview Questions||IBM Mainframe Interview Questions|
|IBM AIX Interview Questions||IBM WAS Administration Interview Questions|
|IBM Lotus Domino Interview Questions||IBM Integration Bus Interview Questions|
|Mainframe DB2 Interview Questions||Unix Production Support Interview Questions|
Ibm Mainframe Tutorial
Introduction To Software Development
Introduction To Ibm Mainframes
Tso And Ispf
Jes2, ]es3 And Sms
Introduction To Job Control Language (jcl)
The Job Statement
The Exec Statement
The Job And Exec Statements
The Dd Statement
Procedures And Symbolic Parameters
Generation Data Groups (gdg), Compile/link-edit And Run Jcls
Access Method Services (ams)
Additional Vsam Commands
Introduction To Rexx
Overview Of Rexx
Introduction To Cics
Exception Handling In Cics
Developing A Cics Application
Cics Programming Techniques
Basic Mapping Support (bms)
Transient Data Control
Temporary Storage Control
Interval And Task Control
Cics Application Design
Recovery And Restart
System Security And Intersystem Communication
Cics Debugging Facilities And Techniques
Bms Map Definition Macros And Copylib Members
Cics Response And Abend Codes
Data, Information And Information Processing
Introduction To Database Management Systems
Introduction To Relational Database Management Systems
Database Architecture And Data Modeling
Overview Of Db2
Structured Query Language (sql)
Data Security And Access
Db2 Application Development
Qmf And Db2i
Db2 Performance Monitoring, Utilities And Recovery/restart
Overview Of Information Management System (ims)
Introduction To Vs Cobol Ii
Overview Of Application Development In Vs Cobol Ii
Overview Of The Cobol Program
Sorting And Merging Files
Coding Cobol Programs That Run Under Cics. Ims, Db2 And Ispf
Compiling The Program
Link-editing The Program
Executing The Program
Improving Program Performance
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.