Skip to content

Copy Refactor (backend)#939

Draft
pujal0909 wants to merge 4 commits intomainfrom
copy-refactor
Draft

Copy Refactor (backend)#939
pujal0909 wants to merge 4 commits intomainfrom
copy-refactor

Conversation

@pujal0909
Copy link
Copy Markdown
Contributor

@pujal0909 pujal0909 commented Apr 15, 2026

What It Does

Backend now uses IEBGENER for copying PS to PS and IEBCOPY for copying PDS to PDS and member to member

How to Test

Review Checklist
I certify that I have:

Additional Comments

@github-project-automation github-project-automation bot moved this to New Issues in Zowe CLI Squad Apr 15, 2026
@zowe-robot zowe-robot moved this from New Issues to In Progress in Zowe CLI Squad Apr 15, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

@github-advanced-security github-advanced-security AI left a comment

Choose a reason for hiding this comment

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

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@pujal0909 pujal0909 linked an issue Apr 15, 2026 that may be closed by this pull request
@pujal0909 pujal0909 requested review from ATorrise and dkelosky April 16, 2026 15:44
Comment thread native/c/zds.cpp Outdated
Comment thread native/c/zds.cpp
options->member_created = true;
}
control_stmt = " COPY OUTDD=SYSUT2,INDD=SYSUT1\n";
control_stmt += " SELECT MEMBER=((" + sourceInfo.member_name + "," + targetInfo.member_name + replace_flag + "))";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

does this allow me to copy something like "SYS1.MACLIB(A*)" and copy all members that start with an A ?

Copy link
Copy Markdown
Contributor Author

@pujal0909 pujal0909 Apr 16, 2026

Choose a reason for hiding this comment

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

No this implementation won't allow copying multiple members. It can be added as a future enhancement?

Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
Copy link
Copy Markdown
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

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

Changes are LGTM! 😋

I'll continue testing to see what's going on with the S0C4s 😋

Left some comments for awareness 🙏

Comment thread native/c/commands/ds.cpp
Comment on lines +1166 to +1170
ds_copy_cmd->add_keyword_arg("overwrite", make_aliases("-o"),
"Replace the entire target partitioned data set with the source data set. All members including like named members will be overwritten",
ArgType_Flag, false, ArgValue(false));
ds_copy_cmd->add_keyword_arg("delete-target-members", make_aliases("--delete-target-members", "-d"),
"delete all members from target PDS before copying (PDS-to-PDS copy only, makes target match source exactly)",
ds_copy_cmd->add_keyword_arg("replace", make_aliases("--replace", "-r"),
"Replaces target sequential/member content with source content or replaces matching members in a partitioned data set with source members (keeps non-matching target members)",
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.

When we add a changelog entry, we should probably not that this is kind of "breaking" 😋

Comment thread native/c/zds.cpp
int rc = copy_sequential(zds, src_mem_dsn, dst_mem_dsn);
if (rc != RTNCD_SUCCESS)
return rc;
static int copy_sequential(ZDS *zds, const std::string &dsn1, const std::string &dsn2, ZDSCopyOptions *options)
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 may cause a small merge conflict with #931

But so far it's fairly isolated.

Image

Comment thread native/c/commands/ds.cpp
}

if (options.target_created)
if (!options.target_exists && !options.member_created)
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 may cause a small conflict with #920

Image

Here is a full list of conflicting files, but that's just because the copy-frontend branch is not up to date with main

Image

Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Refactor Copy functionality backend

5 participants