Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Getting file status of 16 while writing into KSDS VSAM

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
technut

New User


Joined: 27 Dec 2007
Posts: 73
Location: India

PostPosted: Mon Oct 06, 2008 3:13 pm    Post subject: Getting file status of 16 while writing into KSDS VSAM
Reply with quote

Hi,

I am trying to write into a KSDS VSAM file and I am getting file status of 16. I am running this program in the CICS environment. Can somebody please help figuring out this error?
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Mon Oct 06, 2008 3:35 pm    Post subject:
Reply with quote

you should be interrogating the resp and resp2 codes from the CICS API CALL for the vsam i/o. CICS documentation (top of page) will tell you what the error codes mean.

16 is not a valid file-status code - which is a cobol thing.
Back to top
View user's profile Send private message
technut

New User


Joined: 27 Dec 2007
Posts: 73
Location: India

PostPosted: Mon Oct 06, 2008 3:50 pm    Post subject: Reply to: Getting file status of 16 while writing into KSDS
Reply with quote

Thanks for the immediate response.. I am thinking that what I am getting is a file-status error itself. Below is the part of the cobol program that is failing in the CICS envoronment. I found the exact location in error by running the program through CICS EXPEDITOR..
=======================
IF (WS-TEXT-1-0001XX = 'Y')
EXEC CICS WRITE
FROM (OUT-PUT)
RIDFLD (WS-KEY-FLD)
LENGTH (WS-LENGTH)
FILE ('RXRTEST')
RESP (WS-WRTE-RESP)
END-EXEC
========================

The "ws-wrte-resp" has +0000016 at the end of execution.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Mon Oct 06, 2008 4:51 pm    Post subject:
Reply with quote

If you checked the manual, which can be reached from the link at the top of the page, you would find that a 16 RESP value is INVREQ. If you then further checked the manual on the WRITE command, you would find you need to interrogate RESP2 to get more details about the error:
Quote:
INVREQ
RESP2 values:

20
Add operations are not allowed according to the file entry specification in the FCT.

23
When writing records containing embedded keys, the key in the record area (FROM option) and the key in RIDFLD do not match.

26
The KEYLENGTH option is specified, and the specified length does not equal the length defined for the data set that this file refers to.

38
A WRITE with the MASSINSERT option is issued against a BDAM file.

40
A BDAM key conversion error occurred.

44
The WRITE command does not conform to the format of WRITE for a user-maintained or coupling facility data table (for example, MASSINSERT or RBA is specified).

51
A WRITE command specifying the RBA keyword was issued against a KSDS file that is being accessed in RLS mode. RLS mode does not support relative byte address access to KSDS files.

55
NOSUSPEND is not allowed because the file is not a VSAM file that is accessed in RLS mode.

56
An attempt to update a recoverable coupling facility data table has failed because the current unit of work has already updated 1024 recoverable coupling facility data tables. You cannot update more than 1024 recoverable coupling facility data tables within a unit of work

59
XRBA was specified, but the data set is not an extended addressing ESDS.

Default action: terminate the task abnormally.
Back to top
View user's profile Send private message
technut

New User


Joined: 27 Dec 2007
Posts: 73
Location: India

PostPosted: Mon Oct 06, 2008 5:36 pm    Post subject: Reply to: Getting file status of 16 while writing into KSDS
Reply with quote

Thanks a lot!. I figured the issue.. Looks like I have to explicitely specify the value of the length of the VSAM file..Like below,
EXEC CICS
...
LENGTH(100)
...
END-EXEC

Previously I was calling through a WS variable -- LENGTH(WS-LENGTH)

Its quite strange!!, but looks like this was the issue. When I give 100, it works perfectly!
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Mon Oct 06, 2008 5:56 pm    Post subject:
Reply with quote

LENGTH can take a variable -- I've done so many times. Did you define the variable WS-LENGTH as PIC S9(04) COMP and move 100 to it before doing the WRITE? If not, that could explain the results.
Back to top
View user's profile Send private message
technut

New User


Joined: 27 Dec 2007
Posts: 73
Location: India

PostPosted: Mon Oct 06, 2008 6:14 pm    Post subject: Reply to: Getting file status of 16 while writing into KSDS
Reply with quote

I declared it as PIC 9(3) VALUE 100. Could that be an issue?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Mon Oct 06, 2008 6:20 pm    Post subject:
Reply with quote

Oh, very definitely. The hex value of 100 that CICS was expecting was 0064 but you fed it F1F0 -- not at all the same value and negative to boot. The INVREQ makes a lot of sense when you try to write a negative number of bytes to a file. The definition should be PIC S9(04) COMP VALUE +100.
Back to top
View user's profile Send private message
technut

New User


Joined: 27 Dec 2007
Posts: 73
Location: India

PostPosted: Mon Oct 06, 2008 6:35 pm    Post subject: Reply to: Getting file status of 16 while writing into KSDS
Reply with quote

Great info!.. Thanks a lot Robert!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us