View previous topic :: View next topic
|
Author |
Message |
Sunitha
New User
Joined: 29 May 2003 Posts: 2
|
|
|
|
I have an "Cobol I/O error 98 and 41" Do you know what that means? |
|
Back to top |
|
|
mcmillan
Site Admin
Joined: 18 May 2003 Posts: 1210 Location: India
|
|
|
|
Sunitha wrote: |
I have an "Cobol I/O error 98 and 41" Do you know what that means? |
Error 41 is an Cobol file error, you have tried to open a file that's already opened. Before opening the file again, check whether it is closed previously. (watch program flow)
Error code 98 is implementer defined and the reason depends on the compiler you are using. |
|
Back to top |
|
|
xzsymr
New User
Joined: 06 Jun 2003 Posts: 7 Location: NZ
|
|
|
|
Status 98 is file locked. Caused by either RLS or SHR(1) |
|
Back to top |
|
|
Sunitha
New User
Joined: 29 May 2003 Posts: 2
|
|
|
|
xzsymr wrote: |
Status 98 is file locked. Caused by either RLS or SHR(1) |
But sir, What is RLS & SHR(1)...
I can't understand your answer... Is 98 available in Mainframe COBOL. This qs be asked in my Interview. |
|
Back to top |
|
|
DNelsonPNC
EXPERT
Joined: 15 Jun 2003 Posts: 10 Location: North Carolina
|
|
|
|
FILE STATUS values can be found in ERROR DESCRIPTOR (available on Download page of this site). |
|
Back to top |
|
|
xzsymr
New User
Joined: 06 Jun 2003 Posts: 7 Location: NZ
|
|
|
|
RLS - is Record level Sharing. Normaly VSAM will lock entire CI (Control Intervals) in the later releases of VSAM ands SMS only the record level read for update is locked.
SHR(1) is the share options defined for the file
basiclally Only 1 user on 1 system can use the file. |
|
Back to top |
|
|
saravanans4
New User
Joined: 01 Sep 2003 Posts: 25
|
|
|
|
how to move values(for e.g date) from COBOL program to JCL.....
please guide me |
|
Back to top |
|
|
DNelsonPNC
EXPERT
Joined: 15 Jun 2003 Posts: 10 Location: North Carolina
|
|
|
|
There is no provision in MVS to copy application data to JCL. The only comm between application and JCL is via ReturnCode in the range of 0<=4095. |
|
Back to top |
|
|
mdtendulkar
Active User
Joined: 29 Jul 2003 Posts: 237 Location: USA
|
|
|
|
Hello Sunitha,
You can get I/O error 98 due to the RLS / SHR(1) and 41 due to opening an already open file.
Please go through the following explanation about the RLS parameter and let me know in case of any concerns
RLS:
You can, on a system that includes MVS/DFSMS Version 1 Release 3 or higher, use the RLS parameter to specify the level of record sharing, or sharing protocol, for a VSAM data set containing records that must be shared. See DFSMS/MVS Using Data Sets for a description of the sharing protocols and to determine whether your application can run in a shared data environment without modification.
Note: RLS is most useful for an existing application. For a new or heavily-modified application, you can request record-level sharing in application code and do not need to specify RLS on the DD statement.
Specifying RLS does not override any other JCL parameter.
RLS = NRI / CR
NRI - No Read Integrity.
The application can read all records. Use this subparameter if the application can read uncommitted changes made to a data set by another application. NRI provides better performance than the CR subparameter because it avoids the overhead of obtaining a lock when reading a record from the data set.
CR - Consistent Read.
This subparameter requests VSAM to obtain a SHARE lock on each record the application reads. This ensures the application will not read uncommitted changes made to a data set by another application. VSAM obtains the lock while processing a GET NUP request, and releases the lock before completing the GET request. An application that processes a data set allocated with RLS=CR may require modification if it tries to read changes to the data set.
Hope this helps,
Regards
Mayuresh |
|
Back to top |
|
|
saravanans4
New User
Joined: 01 Sep 2003 Posts: 25
|
|
|
|
thanks for uur prompt and quick reply.....
i need answer for other question.
suppose if for assumption if we have one variable which has been assigned as comp and for e.g if the comp can have =3,72,000 bytes and if we assign the value for that variable more than that bytes then what would happen....whether it will give any error message......
thanks and regards,
saravanan |
|
Back to top |
|
|
mdtendulkar
Active User
Joined: 29 Jul 2003 Posts: 237 Location: USA
|
|
|
|
Hello saravanans4,
Quote: |
Binary format numbers occupy 2, 4, or 8 bytes of storage.
If the PICTURE clause specifies that the item is signed, the leftmost bit is used as the operational sign.
A binary number with a PICTURE description of four or fewer decimal digits
occupies 2 bytes; five to nine decimal digits, 4 bytes; and 10 to 18 decimal digits, 8 bytes.
Binary items with nine or more digits require more handling by the compiler.
Testing them for the SIZE ERROR condition and rounding is more cumbersome than with other types.
Use the TRUNC(STD|OPT|BIN) compiler option to indicate how binary data (BINARY, COMP, or COMP-4) is to be truncated. |
TRUNC STD will truncate the data and will show it in the display format.
TRUNC BIN will truncate the BINARY data.
TRUNC OPT will truncate the data depending upon the use of the variable.
and generally avoid using TRUNC OPT option as it may cause problems in case that variable is used in some computations.
TRUNC BIN is the default option.
Conclusion:
IF you try to move the data which is of more length than the PIC clause of the variable, it will get TRUNCATED and will not give any ERROR.
IF you want to be sure that the data is not truncated, you can use ON SIZE ERROR condition.
Hope this helps,
Regards
Mayuresh Tendulkar |
|
Back to top |
|
|
saravanans4
New User
Joined: 01 Sep 2003 Posts: 25
|
|
|
|
thanks boss...
very much delighted by the quick and prompt response......
thanks and regards
saravanan |
|
Back to top |
|
|
kunalgadree
New User
Joined: 13 Apr 2006 Posts: 2
|
|
|
|
98----file is locked....
41-----when ur trying to open a file without closing it....... |
|
Back to top |
|
|
rajesh_mbt
New User
Joined: 27 Mar 2006 Posts: 97 Location: India
|
|
|
|
Hi Senthil
There could be few reasons but without program, we can't assume anything. Hence, would post your program here which will make it more visible to others. |
|
Back to top |
|
|
rajesh_mbt
New User
Joined: 27 Mar 2006 Posts: 97 Location: India
|
|
|
|
Hey All
Please ignore the above post which is wrogly posted here instead of posting someone else. |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
Back to top |
|
|
dnreddy
New User
Joined: 08 Dec 2006 Posts: 8 Location: chennai
|
|
|
|
Hi
COBOL ABENDS 98 & 41
98-->
Reason -- IMPLEMENTER DEFINED
Description -- File is Locked - OPEN failed
41-->
Reason -- LOGICAL ERROR. ATTEMPT TO OPEN A FILE
WHICH IS ALREADY OPENED
Description -- An OPEN statement was attempted for a file in the
open mode.
User Response-- Close the file before opening it with different
mode |
|
Back to top |
|
|
|