B017 VSAM UPDATE IS NOT ALLOWED



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

B017 VSAM UPDATE IS NOT ALLOWED

Postby PJAlarcon » Sat Nov 02, 2013 12:22 am

Hi,
a little background...
System is a mainframe z/OS
Need to update some records from a VSAM KSDS file, the field to be updated is not part of any key.
I have the following pgm

FILE MASTER VS(UPDATE)
     MKEY   1  12 A
     AXCOLL 84 6  A
FILE INFILE
     IKEY   1  12 A
JOB INPUT NULL
GET INFILE
DO WHILE NOT EOF INFILE
  READ MASTER KEY INFILE:IKEY STATUS
  IF MASTER:FILE-STATUS NE 0
    DISPLAY 'ERROR READING: ' MASTER:AXCOLL
  ELSE
    IF MASTER:AXCOLL = 'some-literal'
      MOVE 'another-literal' TO MASTER:AXCOLL
    END-IF
    WRITE MASTER UPDATE
    IF MASTER:FILE-STATUS NE 0
      DISPLAY 'ERROR WRITING: ' MASTER:AXCOLL
    END-IF
  END-IF
  GET INFILE
END-DO


According to the Easytrieve Reference Guide I need to override the installation option/parameter UPDTVS to YES, which is set to NO by default.
I tried several things but keep receiving B017.
What I tried:
inside the pgm code: (got invalid parm every time)
PARM UPDTVS=YES
PARM UPDTVS (YES)
PARM UPDTVS (Y)

in the JCL EXEC line: (didn't work)
EXEC PGM=EZTPA00,PARM='UPDTVS=YES'

Does anyone knows how to get this thing working? How do I override the installation options? (like the guide instructs)

Pablo.
PJAlarcon
 
Posts: 8
Joined: Mon Mar 14, 2011 6:28 pm
Has thanked: 3 times
Been thanked: 0 time

Re: B017 VSAM UPDATE IS NOT ALLOWED

Postby Robert Sample » Sat Nov 02, 2013 1:52 am

It looks like
PARM UPDTVS Y
would do it.

However, this is a vendor product. If your site is licensed to use the product, you are entitled to support from the vendor. The BEST source of an answer to your question will be the vendor, either by looking at the vendor's support site for topics about UPDTVS or by raising an issue for the vendor to address. Then you should be checking with your coworkers, as they have likely run into the same issue in the past. This forum shoulod be pretty much the LAST place you ask.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: B017 VSAM UPDATE IS NOT ALLOWED

Postby PJAlarcon » Sat Nov 02, 2013 2:43 am

Thank you Robert for your prompt response.
We're licensed, I've read the guide, asked coworkers, explored vendor's site, didn't contact vendor though (yet), THEN I posted in the forum.
References to this topic on vendor's site is almost nil.
It is true I didn't contact vendor prior to my post, but you know... (with all due respect, and don't take it personal) is very discouraging to read...
This forum shoulod be pretty much the LAST place you ask

on a forum which motto is
A Help & Support Forum for Mainframe Beginners and Students

Blame me for wanting to exhaust all posibilities.

BTW, your suggestion didn't work.
PARM UPDTVS Y
*******B029 PARAMETER IS INVALID - UPDTVS
*******B029 PARAMETER IS INVALID - Y
PJAlarcon
 
Posts: 8
Joined: Mon Mar 14, 2011 6:28 pm
Has thanked: 3 times
Been thanked: 0 time

Re: B017 VSAM UPDATE IS NOT ALLOWED

Postby Akatsukami » Sat Nov 02, 2013 3:02 am

PJAlarcon wrote:Thank you Robert for your prompt response.
We're licensed, I've read the guide, asked coworkers, explored vendor's site, didn't contact vendor though (yet), THEN I posted in the forum.
References to this topic on vendor's site is almost nil.
It is true I didn't contact vendor prior to my post, but you know... (with all due respect, and don't take it personal) is very discouraging to read...
This forum shoulod be pretty much the LAST place you ask

on a forum which motto is
A Help & Support Forum for Mainframe Beginners and Students

Blame me for wanting to exhaust all posibilities.

There are a distressing number of querents who, for whatever reasons, skip the bolded actions and proceed directly to asking questions on this and similar boards. As with another profession that shall go nameless for the moment, ninety percent of the querents give the other ten percent a bad name. You're a member of the ten percent :)
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: B017 VSAM UPDATE IS NOT ALLOWED

Postby BillyBoyo » Sat Nov 02, 2013 3:38 am

It is an installation option which cannot be overridden by any value on the Easytrieve Plus PARM statement.

You are going to need to to tell your boss so that someone can consult with the Sysprogs responsible for installing it.

The options table EZTPOPT needs to be changed, and you should not do that yourself.

It would be left as "NO" usually for reporting-only functions for MIS and user-written reports.

If they are unable to change the EZTPOPT that you are using, they should be able to set up another library for you with a customised version.

Full details will be in the installation/customisation guide, which your Sysprogs will have.

These users thanked the author BillyBoyo for the post:
PJAlarcon (Sat Nov 02, 2013 3:42 am)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: B017 VSAM UPDATE IS NOT ALLOWED

Postby BillyBoyo » Sat Nov 02, 2013 4:13 am

You don't show a STOP in your program. Means it won't stop.

You can use the automatic input, instead of the GET and the DO.

    JOB INPUT INFILE
      READ MASTER KEY INFILE:IKEY STATUS
      IF MASTER:FILE-STATUS NE 0
        DISPLAY 'ERROR READING: ' MASTER:AXCOLL
      ELSE
        IF MASTER:AXCOLL = 'some-literal'
          MOVE 'another-literal' TO MASTER:AXCOLL
        END-IF
        WRITE MASTER UPDATE
        IF MASTER:FILE-STATUS NE 0
          DISPLAY 'ERROR WRITING: ' MASTER:AXCOLL
        END-IF
      END-IF


You don't specify STATUS for the WRITE, so Easytrieve will give you an automatic message, and you won't see yours.

You WRITE irrespective of the record being changed. It'll save some resources to do it conditionally.

You reference a field on MASTER if you have failed to read it. This will cause the program to fail at that point.

    JOB INPUT INFILE
      READ MASTER KEY INFILE:IKEY STATUS
      IF NOT MASTER
        DISPLAY 'ERROR READING: ' IKEY
        GO TO JOB
      END-IF
      IF MASTER:AXCOLL = 'some-literal'
          MOVE 'another-literal' TO MASTER:AXCOLL
         WRITE MASTER UPDATE STATUS
        IF MASTER:FILE-STATUS NE 0
          DISPLAY 'ERROR WRITING: ' IKEY " " MASTER:AXCOLL
        END-IF
      END-IF
 


This JOB, using the autormatic input, will stop on its own. Less code to look at. Easier to spot any problems.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: B017 VSAM UPDATE IS NOT ALLOWED

Postby PJAlarcon » Sat Nov 02, 2013 4:39 am

Thanks Billy,
I'm just starting with Easytrieve, and these are valuable observations.

I don't think I will have any luck changing installation options. Probably I'll have to go the hard way, by unloading to PS and updating with SORT, tthen IDCAMS DEFINE and REPRO...
I was trying to find a more efficient way by updating records retrieveing them by key and then writing them back to the VSAM file.

What misled me was some paragraphs in the Reference Guide, about the possibilty to override environments options temporarily.
PJAlarcon
 
Posts: 8
Joined: Mon Mar 14, 2011 6:28 pm
Has thanked: 3 times
Been thanked: 0 time

Re: B017 VSAM UPDATE IS NOT ALLOWED

Postby BillyBoyo » Sat Nov 02, 2013 5:16 am

Some options you can override. Those in the Chapter on the Environment, where the Eaystrieve Plus PARM is documented, can be. The others can't.

Let your boss know that you won't be able to update VSAM files with Easytrieve Plus. You never know.

Alternative: SORT to COPY to a PS. SORT to read the PS, make the changes and write to the VSAM. You only need to DELETE/DEFINE if the file is not reusable. SORT is much faster than IDCAMS REPRO.

If you are used to COBOL, be careful. Don't assume that stuff which looks like COBOL (like MOVE) works like COBOL. Use assignments (=) and save MOVE for files and if you need variable-length fields.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: B017 VSAM UPDATE IS NOT ALLOWED

Postby dick scherrer » Mon Nov 04, 2013 4:42 am

Hello,

My connection to the system that runs a Lot of VSAM is not available until tomorrow. I'm about 99% sure that that application reads and updates VSAM records on-the-fly. I don't know if there has been any customization, but (iirc) several Easytrieve processes do this.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post