Monday, September 29, 2008

MVS codes

MVS SYSTEM CODES
S001
An I/O error condition was encountered during BDAM, BISAM, BPAM, BSAM, QISAM, or QSAM processing
Possible causes:
An attempt was made to read after end-of-file.
An attempt to open an open file.
There was a conflict between the program, the JCL DCB, and the data set DCB information.
An incorrect block or record length was specified.
An attempt was made to write to an input data set.
There was physical damage to the recording medium.
There was a hardware malfunction.
Solution:
Verify that the program logic is correct.
Compare the DCB attributes in the program with the JCL and the data set label. Correct any inconsistencies.
Ensure that the length of the work area for a write is the same as the FD record length.
Recreate the problem data set if necessary.
S002
Possible causes:
An error occurred in processing a sequential or indexed sequential data set, or in creating a direct access data set.
The record being processed exceeded the allowable size. An error occurred in reading a sequential data set.
The variable record length was less than 4.
The LRECL was greater than the DCB record length.
An error occurred in sequential processing of variable length spanned records which were not in sequence.
In writing to a sequential or direct access data set, the record length was greater than 32,767 bytes.
In writing to a sequential or direct access data set, the record length was greater than the track capacity.
In writing to a sequential or direct access data set, the variable length record was longer than 32,752 bytes (the data set used track overflow).
In writing to a sequential or direct access data set, the record length exceeded the DCB block size.
In writing to a sequential data set with variable length records, an invalid length field was encountered:

1. It was less than 4 (or 5 with ASA control characters)

2. It was greater than the DCB blocksize or 32,767 bytes.
An error occurred in writing a record longer than the track capacity (the data set did not use track overflow).
An error occurred in obtaining a secondary extent, when writing to a direct access file. There was not enough secondary space to hold the block being written.
Other causes:
An error occurred in writing a block larger than the primary extent on the pre-allocated direct access data set in opening a direct data set, it was determined that the blocksize was larger than the primary extent. An error occurred in opening an indexed sequential data set:

1. Too many tracks were requested for cylinder overflow. 2. The DCB BLKSIZE was not a multiple of the DCB LRECL.
Solution:
1. Change the JCL and/or program DCB information to be consistent with that of the data set.

2. Recreate the data set specifying the correct DCB information.

3. Recreate the data set so that the spanned records are in the correct sequence.

4. Verify the record definition, particularly the number of occurrences in an occurs clause.

5. If the record length exceeds the track length, specify a different device in the unit parameer.
S012

A program incorrectly issued a TIMEUSED macro. A reason code in register 15 explains the error:Possible causes:4 The program issued TIMEUSED with LINKAGE=SYSTEM, but the program was not in task control block (TCB) mode.8 The program issued TIMEUSED with LINKAGE=SYSTEM, but the program held one or more locks.C The program issued TIMEUSED with LINKAGE=SYSTEM when enabled unlocked task (EUT) recovery routine was running.Solution:
System Action: The system abnormally ends the program that issued the TIMEUSED macro.Programmer Response: Modify the code so that TIMEUSED will be issued in the correct environment. Run the program again.
S013
An error occurred in opening a data set because of conflicting or unspecified data set attributes.
Possible causes:
There was a conflict between the program, the JCL, and the data set label DCB information required.
Some required DCB information was omitted.
Directory space was not allocated for a partitioned data set.
The BLKSIZE DCB sub-parameter was missing for a dummy data set.
A specific member of a partitioned data set could not be located.
For fixed block records, the LRECL=0, or the data set was empty.
For fixed length records, the BLKSIZE was not a multiple of the LRECL.
For variable length records, the blocksize was not four bytes greater than the logical record length.
RECFM=F was specified and the logical record length was not the same as the block size.
Solution:
Check the DCB attributes of the problem data set and correct any inconsistencies. Check for inconsistencies between the program, the JCL, and the data set DCB characteristics.
Verify that all the DCB information required for the data set is specified.
Recreate the partitioned data set specifying a value for directory blocks in the space parameter.
Specify a BLKSIZE that matches the program DCB information.
Check the spelling for any programs to be executed.
Verify that the appropriate STEPLIB data sets have been provided.
S03B
An error occurred in opening an indexed sequential data set.
Possible causes:
1. A write to the data set was attempted when DISP=SHR was coded in the JCL.

2. A write to the file was attempted when it was not opened for output.

3. The data set was not created or it was not closed after it was created.

4. The block sizes or logical record lengths in the program were inconsistent with the JCL.

5. The data set was already open.
Solution:
1. If the data set is to be updated, ensure that DISP=OLD is specified in the JCL, and that the data set is opened for output.

2. Ensure that the data set is closed after it is created.

3. Verify that the program is consistent with the DCB information and that the block size is a multiple of the LRECL.
S03D
An error occurred in opening an indexed sequential or direct access data set.
Possible causes:
1. There was a conflict between the program and the JCL data set organization.

2. The volume parameter for a multi-volume data set was incorrect.

3. Not all of the volume serial numbers of the data set were specified.

4. The volume serial numbers were specified in wrong sequence. The DD statement did not specify indexed sequential organization. Can open was issued for a direct access data set, but the data set had indexed sequential organization.


Solution:
1. Ensure that the data set organization specified in the program is consistent with the DSORG sub-parameter in the JCL.

2. Verify that all the volumes that the data set resides on are specified in the sequence in which the data set exists.

solutions:
1. For indexed sequential data sets, specify the volume containing the index first.

2. Verify that all the volumes which the data set resides on are specified in the sequence in which the data set exists.

3. Ensure that all the requested volumes are mounted. Specify either dsorg=is or dsorg=isu in the DCB parameter. Determine the organization of the data set, and make the appropriate program or JCL changes.
S031
An error occurred while sequentially processing an indexed sequential data set.
Possible causes:
1. A stop run or goback was executed before a data set was closed.

2. An out-of-sequence or duplicate key was detected while loading the data set.

3. An attempt was made to write an invalid length record or block.

4. There was a hardware malfunction.

5. The recording medium was defective.
Solution:
1. Change the program logic so that the data set is closed before the stop run or goback is executed.

2. Recreate the data set ensuring that the keys are in proper sequence.

3. Be sure that the JCL LRECL is consistent with the program and data set label.
S04E
DB2 related abend. Check the messages in SYSPRINT.
Possible causes & Solution:
Resource unavailable.
A decimal packed field contained non-numeric data when an INSERT or an UPDATE SQL statement was executed.
An SQL WHERE clause in a cursor contains a packed numeric working storage field that contains non-numeric data when the OPEN CURSOR statement is executed. Initialize the field or remove it from the SQL statement if not used.
S0CA
The result of an arithmetic operation was too large for the receiving field.
Possible causes & Solution:
1. An attempt was made to divide by too small of a number.

2. An attempt was made to multiply by too large of a number.

3. A program loop containing an arithmetic instruction caused an invalid result.

S0CB
An invalid divide was attempted.
Possible causes & Solution:
1. The divisor was zero.

2. The quotient exceeded the allowed data field size.

solutions:
1. Determine why the divisor is zero.

2. Expand the size of the dividend field, or reduce the size of the divisor field. Note: a comp-3 field may not exceed 15 digits.
S0C1
The current machine instruction was invalid.
Possible causes & Solution:
1. A JCL DD statement was either invalid or missing.

2. An attempt was made to open a data set which was already open.

3. A read/write was attempted to an unopened data set.

4. An attempt was made to execute a subroutine which was not link edited into the load module.

5. The select clause was invalid for an isam data set.
S0C2
Possible causes & Solution:
The current machine instruction was invalid.

1. A JCL DD statement was either invalid or missing.

2. An attempt was made to open a data set that was already open.

3. A read/write was attempted to an unopened data set.

4. The select clause in the file-control paragraph did not specify an index sequential data set, when in fact the data set was indexed sequential.

5. A subscript or index contained an invalid value.
S0C4
An invalid machine address was calculated by the program.
Possible causes & Solution:
1. A subscript or index contained an invalid value.

2. A JCL DD statement was either invalid or missing.

3. The blocksize and record size were specified as equal for variable length records.

4. An attempt was made to read/write an unopened data set.

5. An attempt was made to read after end-of-file.

6. A stop run occurred before all opened data sets were closed. B. In the input or output procedure of a sort.

7. An attempt was made to reference an input/output area but no open or read had occurred for the data set.

8. Invalid parameters were passed through the linkage section.

9. The file-control select clause was missing for the data set that was being processed.
S0C5
An invalid address was specified.
Possible causes & Solution:
1. A close statement was issued twice for the same file.

2. A procedure which was operated on by a Perform statement contained an improper exit.

3. An attempt was made to reference an input/output area, but no open or read had occurred for the data set.

4. A subscript or index contained an invalid value.

5. A JCL DD statement was either invalid or missing.

6. The blocksize and record size were specified as equal for variable length records.

7. An attempt was made to read/write an unopened data set.

8. An attempt was made to read after end-of-file.9. A stop run occurred before all opened data sets were closed.

9 In the input or output procedure of a sort.

10. Invalid parameters were passed through the linkage section. 11. The file-control select clause was missing for the data set that was being processed.
S0C6
An attempt was made to execute a machine instruction which had invalid operands.
Possible causes & Solution:
1. The program fields and/or data sets were incorrectly defined.

2. A multiplier or divisor was too large.

3. A subscript or index contained an invalid value.

4. A JCL DD statement was either invalid or missing.

5. The blocksize and record size were specified as equal for variable length records.

6. An attempt was made read/write to an unopened data set.

7. An attempt was made to read after end-of-file.

8. A stop run occurred before all opened data sets were closed. B. In the input or output procedure of a sort.

9. An attempt was made to reference an input/output area, but no open or read had occurred for the data set.

10. Invalid parameters were passed through the linkage section.

11. The file-control select clause was missing for the data set that was being processed.
S0C7
A numeric field contained non-numeric data.
Possible causes & Solution:
1. Numeric data was not initialized.

2. A subscript or index contained an invalid value.

3. A comp-3 field had an invalid sign.

4. A group move overlaid a numeric field with non-numeric data.
S0C8
The result of an arithmetic operation was too large for the receiving field.
Possible causes & Solution:
1. An attempt was made to divide by too small of a number.

2. An attempt was made to multiply by too large of a number.

3. A program loop containing an arithmetic instruction caused an invalid result.
S0C9
A division gave a quotient which was too large for the program defined field.
Possible causes & Solution:
1. An attempt was made to divide by zero

. 2. An attempt was made to divide by too small of a number.

3. A program loop containing an arithmetic instruction caused an invalid result.

4. A sort operation was missing a SORTIN or SORTOUT JCL DD card.


S213
An error occurred in opening a data set on a direct access device.
Possible causes:
1. A specific data set could not be located.

2. DISP=OLD or DISP=SHR was specified for an output data set.

3. DISP=MOD was specified but the data set did not exist.

solutions:
1. Ensure that the data set name and volume serial number are correct and that the disposition of the data set is consistent with its usage.

2. If a data set is used from a preceding job step, be sure that the data set was created and passed correctly.
S214
An error occurred in volume disposition or in tape positioning when closing a magnetic tape data set
Possible causes & Solution:
1. There was an invalid user label.

2. There was no tapemark following the data

3. A hardware error occurred.

4. The recording medium was defective.

solutions:
1. Verify that the label formats are correct. If they are invalid, recreate the data set.

2. Determine if there is a tapemark following the data. If not, recreate the data set.

3. Rerun the job specifying a different volume or device.
S237
An error occurred in end-of-volume processing of a magnetic tape data set.
Possible causes & Solution:
1. The block count of the tape label did not agree with that of the DCB. One or more blocks may have been skipped during processing.

2. An incorrect volume serial number was specified in the volume parameter of the DD statement.

3. An incorrect volume was mounted.

4. The DSN was misspelled.

solutions:

1. Verify that the DSN is spelled correctly, and that the correct volume(s) are specified and mounted. Correct any errors, and resubmit the job.

2. If all the data set information appears correct, resubmit the job specifying a different device in the unit parameter of the JCL. If this does not correct the error, re-create the data set.
S314
An input/output error occurred in closing a data set on a direct access device. Possible causes: The volume or the device was defective.
Resolution: Rerun the job specifying another volume or device.
S322
Description: The time limit was exceeded for a job or job step. Possible causes:

1. An endless loop occurred in the executing program.

2. The time parameter on the job card did not allow enough time for the job to complete.

3. The time parameter on the exec card did not allow enough time for the step to complete.

4. If the time parameter was not specified, the default time limit was exceeded.
Resolution:

1. Check for program errors, especially endless loops that cause the job or job step to exceed the time limit.

2. Verify that the time limits for the given job are realistic. If necessary, specify a longer time in the time parameter, and rerun the job.
S30A
Memory error

1. The EZTVFM file is not large enough for the report being generated.

2. You have a subscript or index that is going out-of-bounds on an table or occurs clause .

3. A file or table size is greater than the JCL/file LRECL.

4. DCB mismatch.
S413
An error occurred in opening either a direct access or a magnetic tape data set.

1. An input/output error occurred in processing a tape data set.

2. The specified data set could not be located.

3. The label or DCB parameters were incorrect.

4. A requested device was unavailable.


S513
An error occurred in opening two data sets on the same magnetic tape volume. This only works with SYSOUT data sets.

1. Two data sets were assigned to the same device.

2. An open was issued for a second data set on the same tape device before the first one was closed.

solutions:
1. Verify that the JCL is correct 2. Check the file usage in the program.
S522
The wait time limit was exceeded for a job or job step.

1. The operator did not respond to a console request.

2. The program was waiting for a resource that was not available at execution time.

3. The CPU resource was not available at execution time.

4. The user request was invalid.

solutions:
1. Check with the operator to determine if there were any outstanding requests for your job.

2. Check with the operator to determine if there were any problem jobs running at the same time as yours.
S613
An error occurred in tape related input/output.

1. The JCL DD statement was incorrect.

2. An input/output error occurred in label processing.

3. The standard header labels were missing for an input data set.

4. There was a hardware malfunction. An error occurred in tape positioning. An error occurred in reading a tape label. The tape label was invalid. An error occurred in writing a tape label. An error occurred in writing a tapemark after the header labels.

solutions:

1. Verify that the JCL specifies the correct volume and device.

2. Verify that the volume contains standard labels.

3. Resubmit the job specifying a different volume or device.
S637
An error occurred in end-of-volume processing. An input/output error was encountered in 1. Writing a tapemark. 2. Positioning the tape. 3. Reading a label. 4. Sensing for a file protection ring. An error occurred in either:

1. Reading a tape label.

2. Writing a tapemark.

3. Positioning a tape volume. The user trailer label processing caused a tape positioning error. Data sets with unlike attributes were concatenated. A tape positioning error occurred for a data set to be read backwards. If the tape contained labels, the error occurred in positioning the labels; otherwise, the error occurred in positioning the data. The error occurred in the open instruction with the leave option specified. An error occurred in tape positioning for a data set using the reread option. An error occurred while rewinding a tape prior to verifying the volume label. An error occurred in reading a tape volume label. An error occurred because the tape had nonstandard labels or none at all. An error occurred while positioning at the labels, (or if there were no labels, while positioning at the data) of a concatenated data set. An error occurred while positioning at the labels, (or if there were no labels, while positioning at the data) of a data set opened with input or inout to be read forward. An I/O error occurred in sensing for a file protection ring. An error occurred in tape positioning following header label processing.

Solutions:

1. Check the JCL for any inconsistencies in the label, the vol=ser, or the dsn.

2. Rerun the job specifying another volume or device.

3. Make sure that the file protection ring is available for an output data set.
S706
A non-executable load module was requested by the program. The module did not link edit successfully. Link edit the offending module again, and resubmit the job.
S713
An error occurred in opening a data set on tape.

1. An attempt was made to output to the data set, before the expiration date specified had been reached.

2. The incorrect volume was requested.

Solutions:
1. Verify that the correct data set and volume will be accessed.
S714
An error occurred in closing a tape data set.

1. An I/O error occurred while writing a trailer label or tapemark. Rerun the job specifying another volume or device.
S722
The maximum number or output lines has been exceeded.

1. The program contained an invalid write loop.

2. The number of output lines was underestimated in the JCL.

Solutions:
1. Check for and fix program logic error causing a loop.
S80A
The storage needed to execute the program was not available.

1. The region parameter did not specify enough storage.

2. The region parameter was omitted, and the default storage amount was too small to run the correct program.

3. Block sizes were increased or buffers were added, and the region size was not increased.

4. A logic error caused excessive storage to be obtained but not freed.

Solutions:
1. Increase the region size.

2. Look for logic errors which may cause excessive calls to other programs or requests for storage.
S804
The storage needed to execute the program was not available.

1. The region parameter did not specify enough storage.

2. The region parameter was omitted, and the default storage amount was too small to run the correct program.

3. Block sizes were increased or buffers were added, and the region size was not increased.

4. A logic error caused excessive storage to be obtained but not freed.

Solutions:
1. Increase the region size.

2. Look for logic errors which may cause excessive f calls to other programs or requests for storage.
S806
A module requested by the program could not be found. 1. The module requested did not exist in the data sets specified in the STEPLIB or JOBLIB. 2. A JCL STEPLIB or JOBLIB DD statement was missing or incorrect. 3. The module name was misspelled. 4. An I/O error occurred in searching for the module in the library directory.

Solutions:

1. Verify that the correct program is being requested.

2. Ensure that the appropriate STEPLIB or JOBLIB DD statements are in the JCL.

3. If necessary, recreate the data set.
S813
The data set name in the JCL did not match the data set name on the tape. 1. The JCL volume serial number was wrong.

2. The data set name in the JCL was misspelled.

3. The wrong tape was mounted.

4. The incorrect data set sequence number was specified in the label parameter.

5. The data set does not exist on the magnetic tape. Verify that the JCL is correct, and resubmit the job.
S913
An error occurred in opening a magnetic tape data set.

1. The error occurred during open or end-of-volume processing. The data set was password protected, and a correct password was not entered.

2. The error occurred in opening a checkpoint data set which was concatenated to a non-checkpoint data set.

Solutions:
1. Supply the correct password, and resubmit the job.

2. Eliminate any concatenations of checkpoint and non-checkpoint data sets.
SA13
An error occurred in opening a tape data set.

1. The file sequence number was wrong on a multi-volume tape data set.

2. The file sequence number was wrong, or it was less than that of the first data set on the tape. 3. The volume serial number was wrong. 4. The job which wrote the tape did not write all the data sets.

Solutions:
1. Verify that the JCL is correct, and resubmit the job.

2. If the desired data set does not exist on the tape, recreate the tape.
SB37
An error occurred during end-of-volume processing of a data set. The system was unable to fulfill a request for more space.

1. A program loop caused too many records to be written to the output data set.

2. Insufficient space was allocated to this data set in the JCL.

3. There was no more room available to receive any more output on the output volume, and another volume could not be mounted.

Solutions:


1. Verify that there are no program loops or logic errors.

2. Increase the primary and/or secondary allocations for the data set.

3. Change the JCL to request that the data set be created on a volume with more space.
SC13
An error occurred in opening a concatenated partitioned data set.

1. A concatenated data set was opened for output.

2. A data set was opened twice.
Be sure that the concatenated partitioned data set is being opened properly.
SD37
An error occurred in writing to a data set which had not been allocated enough space. 1. A secondary allocation was not specified, and all of the primary space had been used. 2. There was a program loop.

1. Check through the program logic for a loop.

2. Allocate more space to the data set by specifying larger primary and/or secondary quantities in the space parameter in the JCL DD statement.
SE37
An error occurred during output to a direct access or magnetic tape data set.

1. The data set used all the space on the current volume.

2. There were not enough volumes allocated for the data set.

3. For a PDS, either all 16 extents were used, or the volume that it resided on was filled.

4. For a multi-volume sequential data set, the data set already existed on a subsequent volume.

recommended books

I. COBOL:
COBOL PROGRAMMING - M.K. ROY\1998 - ISBN 0-07-460318-3
COBOL UNLEASHED - JON WESSLER\1998 - ISBN 81-7635-154-7
MURACH's STRUCTURED COBOL ISBN 1-890774-05-7
ADVANCED COBOL - LEONARD J.K - MCGRAW Hill - 1995
TEACH YOURSELF COBOL - Mo BUDLONG - ISBN 0-672-30469-4
COBOL FROM MICRO TO MAINFRAME-GRAUER -ISBN 0-13-138686-7MASTERING COBOL - CAROL BAROUDI - ISBN: 078212321X MICROSOFT COBOL REFERENCE MANUAL - 2000
COBOL UNDER CONTROL - W.C CAVE - 1986 - PAPER VOL:13
COBOL 2002 - ISO/IEC 1989:2002(E) NB
ISO/IEC DIRECTIVES PART-3 - 1997, ISBN 92-67-01070-0.
THE UNICODE STANDARD V3.0 ,ADDISON WESLEY,
FEB 2000, ISBN 0-201-61633-5
II. JCL
MURACH's OS/390 & z/OS JCL ISBN 1- 890774-14-6
THE MVS JCL PRIMER - ZAMIR & RANADA
S\390 JOB CONTROL LANGUAGE - DEWARD BROWN\2001 - ISBN 04-7128-309-6

III. CICS:
CICS HANDBOOK - YAKHISHA KAGEYAMA - ISBN 0-07-463221-3
MURACH's CICS FOR THE COBOL PROGRAMMER ISBN 1-890774-09-X
Command Level Programming - Alida M. Jatich\1991 - ISBN 04-7152-862-5
CICS SUPPLIED TRANSACTIONS - IBM SC33-0511

IV. DB2:
DB2 for the Cobol Programmer - Steve Eckols - ISBN 1-890774-02-2
DB2 COMPLETE REFERENCE
Database Administration - CRAIG S. MULLINS
DB2 DEVELOPERS GUIDE - Craig S. Mullins
DB APPLICATION PROGRAMMING GUIDE - IBM SC26-4080
DB2 for z/OS Version 8 DBA Certification Guide - Susan Lawson
DB2 Universal Database V8.1 Certification Exam 700 Study Guide - Roger E. Sanders
DB2 Universal Database V8.1 Certification Exam 703 Study Guide - Roger E. Sanders
V. VSAM:
Vsam for the Cobol Programmer- Doug Lowe - ISBN-10: 0911625453
Vsam: Access Method Services and Programming Techniques - James Martin


Buy Mainframe Complete Reference (Worldwide Delivery)
Small opportunities are often the beginning of great enterprises

what is mainframe

WHAT IS MAINFRAME ?

IBMMAINFRAMES.com Definition:
Mainframe is a High performance Multi User computer system which is the most scalable, available, reliable and secured machine in the world capable of performing some Million Instructions per second (upto 569,632 MIPS) with the following characteristics:
1) Reliable single-thread performance, which is essential for reasonable operations against a database.
2) Maximum I/O connectivity, which means mainframes excel at providing for huge disk farms.
3) Maximum I/O bandwidth, so connections between drives and processors have few choke-points.
4) Reliability--mainframes often allow for "graceful degradation" and service while the system is running.
Applications of mainframe various from computing the Random number series to census, industry and consumer statistics, ERP and financial transaction processing..