zowe / zowe-explorer-vscode

Visual Studio Code Extension for Zowe, which lets users interact with z/OS Data Sets, Unix System Services, and Jobs on a remote mainframe instance. Powered by Zowe SDKs.
Eclipse Public License 2.0
173 stars 92 forks source link

Unable to update datasets with VBA Format #467

Open Colin-Stone opened 4 years ago

Colin-Stone commented 4 years ago

Raised on behalf of customer who believes this function used to work.

It should be possible to edit a VBA dataset.

Create a VBA dataset e.g. dsname: STONECC.TEST.VBA blksz: 50 cdate: 2020/01/24 dev: 3390 dsorg: PS edate: None extx: 1 lrecl: 0 migr: NO mvol: N ovf: NO rdate: 2020/01/24 recfm: VBA

Edit this file and save. The save operation results in a Http 412 which causes the compare function to be invoked. Etag?

Colin-Stone commented 4 years ago

There appears to be an issue with the etag value. Created a new VB dataset. Updated it once via the Zowe Explorer. All good. Updated second time getting 414. Suspicion that etag is not being updated in node when uploading

stepanzharychevbroadcom commented 4 years ago

@Colin-Stone initial results of the research are: Problem seems to be connected with usage of ASA print control characters for VBA. I created VBA dataset with following set up and it had problem with ETAG verification: Screenshot 2020-04-08 at 11 22 44 Though for VB Dataset I see no problems at all: Screenshot 2020-04-08 at 12 34 48

So it seems that ETAG is calculated differently for VBA Datasets while we're trying to do save/download as for the common one, it would explain the situation, also log shows the following picture:

Upload Etag: A0B56CC018A82E76A16531619FAA0536 // Initial upload for empty dataset
Upload Etag: 9685987788AA5DFFECEFE47A208AB5BF // Second upload attempt
Download Etag: 64494D661F8B954F4F19F4E521145D51 // Etag which is returned by server
stepanzharychevbroadcom commented 4 years ago

Additional research results are: Screenshot 2020-04-08 at 14 50 44 I created FBA Dataset and it has exactly the same problem. So it definitely proofs that the reason for all of those issues is ASA print control. We should figure out some way to align flows for the end users, I would suggest the following ways:

  1. Allow users to do unsafe save which doesn't use ETag only for those A Datasets;
  2. Disallow to do any write/update operations for A Datasets and open them in read-only mode (should be mentioned in documentation);
  3. Do nothing and mention in documentation that we don't support such datasets;
zdmullen commented 4 years ago

Thanks to Richelle for finding an issue in the Zowe CLI project that is related to this one: Uploading file to dataset with RECFM=FBA shifts lines one char to the right #537. There is also a linked PMR issue as well, so the team thinks it would be good to vote for the PMR issue, found here: https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=137769