Skip to content

API for Dataset/Dataset Member Allocation - #473

Open
aditya-ranshinge wants to merge 8 commits into
v2.x/stagingfrom
users/aditya/feature/add-more-ds-parameters
Open

API for Dataset/Dataset Member Allocation#473
aditya-ranshinge wants to merge 8 commits into
v2.x/stagingfrom
users/aditya/feature/add-more-ds-parameters

Conversation

@aditya-ranshinge

@aditya-ranshinge aditya-ranshinge commented May 16, 2022

Copy link
Copy Markdown
Contributor

Proposed changes

API for Dataset/Dataset Member Allocation was implemented in #351 this PR , which was reviewed by Leonty.
This PR is continuation of above mentioned PR where Allocation Unit, Average Record Unit, Primary Space, Secondary Space, Directory Blocks, Dataset Name Type attributes added for dataset creation.

This pull request implements the following feature:

  • API which enables the allocation of datasets and dataset members.
  • Add 'PUT' method to /datasetContents, accepts JSON body to specify dataset parameters

This PR depends upon the following PRs:
zowe/zowe-common-c#292

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Change in a documentation
  • Refactor the code
  • Chore, repository cleanup, updates the dependencies.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

PR Checklist

Please delete options that are not relevant.

  • If the changes in this PR are meant for the next release / mainline, this PR targets the "staging" branch.
  • My code follows the style guidelines of this project (see: Contributing guideline)
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • New and existing unit tests pass locally with my changes
  • video or image is included if visual changes are made
  • Relevant update to CHANGELOG.md
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works, or describe a test method below

Testing

Further comments

Signed-off-by: Aditya Ranshinge <aranshinge@rocketsoftware.com>
…Directory Blocks, Dataset Name Type attributes for dataset creation

Signed-off-by: Aditya Ranshinge <aranshinge@rocketsoftware.com>
Signed-off-by: Aditya Ranshinge <aranshinge@rocketsoftware.com>
@aditya-ranshinge
aditya-ranshinge marked this pull request as ready for review May 17, 2022 11:36
…issue

Signed-off-by: Aditya Ranshinge <aranshinge@rocketsoftware.com>
@ifakhrutdinov

ifakhrutdinov commented May 23, 2022

Copy link
Copy Markdown
Contributor

I'll review this once the zowe-common-c PR has been figured out.

Signed-off-by: Aditya Ranshinge <aranshinge@rocketsoftware.com>
…emoved unwanted functions and macros

Signed-off-by: Aditya Ranshinge <aranshinge@rocketsoftware.com>
Signed-off-by: Aditya Ranshinge <aranshinge@rocketsoftware.com>
Comment thread c/datasetjson.c Outdated
rc = setTextUnit(TEXT_UNIT_INT24, 0, NULL, toi, DALBLKLN, configsCount, inputTextUnit);
}
}
} else if(!strcmp(propString, "status")) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be called disp, not status, because disp is the term that everyone knows.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved

Comment thread c/datasetjson.c Outdated
} else if (!strcmp(propString, "ndisp")) {
if (!strcmp(valueString, "UNCATLG")){
parmDefn = DISP_UNCATLG;
} else if (!strcmp(valueString, "DELETE")){

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if delete deletes... this shouldnt be in the PUT api at all.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove it from PUT api

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved

Comment thread c/datasetjson.c
}
rc = setTextUnit(TEXT_UNIT_CHAR, 0, NULL, parmDefn, DALSTATS, configsCount, inputTextUnit);
} else if (!strcmp(propString, "ndisp")) {
if (!strcmp(valueString, "UNCATLG")){

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd like to know more about uncatalog to know if this is something we should be allowing the users to do.

@aditya-ranshinge aditya-ranshinge Aug 3, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is very limited IBM documentation about UNCATLG parameter.
Explanation of other parameters is present but links pointing to UNCATLG doesn't have contents like this link https://www.ibm.com/docs/en/zos/2.1.0?topic=parameter-uncataloging-data-set

But what I have got so far is "In UNCATLG case the data set exists but it deletes the catalog entry from the catalog file. "

@1000TurquoisePogs

Copy link
Copy Markdown
Member

I didn't mark this PR as bad or good but rather just saw some things that made me thing we should ask a senior mainframe user to get opinions on whether we should restrict the API to avoid people accidentally doing things they will regret due to having options they dont understand.

Comment thread c/datasetjson.c
if (valueStrLen <= CLASS_WRITER_SIZE){
rc = setTextUnit(TEXT_UNIT_STRING, valueStrLen, &(valueString)[0], 0, DALSPGNM, configsCount, inputTextUnit);
}
} else if(!strcmp(propString, "close")) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meaning "autounallocate"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want me to add "autounallocate" comment here?
I have referred these docs https://www.ibm.com/docs/en/zos/2.4.0?topic=units-unallocation-close-specification-key-001c

Comment thread c/datasetjson.c Outdated
if (valueStrLen <= DD_NAME_LEN){
rc = setTextUnit(TEXT_UNIT_STRING, DD_NAME_LEN, &(valueString)[0], 0, DALRTDDN, configsCount, inputTextUnit);
}
} else if(!strcmp(propString, "spin")) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved

Signed-off-by: Aditya Ranshinge <aranshinge@rocketsoftware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

3 participants