JCL 用于将某些成员从一个 PDS 复制到另一个 PDS

发布于 2024-09-25 20:13:26 字数 196 浏览 11 评论 0原文

我正在尝试将一些成员从一个 PDS 复制到另一个 PDS。假设我在一个 PDS 中有 500 名成员。我正在尝试将前 100 个移动到第二个 PDS,将下一个 100 个移动到第三个 PDS,依此类推。复制到另一个 PDS 的成员也应从源 PDS 中删除。

使用 JCL 可以做到这一点吗?我正在查看 IEBGENER,但我发现我们可以通过指定名称直接复制成员。

I am trying to copy some members from one PDS to another. Suppose I have 500 members in one PDS. I am trying to move the first 100 to the second PDS, the next 100 to the third PDS, and so on. The members which are copied to another PDS should also be deleted from the source PDS.

Is it possible to do this using JCL? I am looking at IEBGENER but there I found we can directly copy members by specifying names.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

土豪 2024-10-02 20:13:26

您可以通过几个工作步骤来完成此操作。概述:

  • 将 LISTDS 'input-pds-name' MEMBERS 的输出捕获到数据集中
  • 使用 ICETOOL 操作 MEMBERS 列表以生成 IDCAMS REPRO 和 DELETE 命令
  • 运行 IDCAMS REPRO
  • 运行 IDCAMS DELETE

设置 ICETOOL 以选择和格式化 MEMBERS列出 REPRO/DELETE 命令
到目前为止,这是最困难的一步。事实上你可能需要链接几个
ICETOOL 步骤让一切顺利。这可能需要很长时间
除非你有很多经验才能弄清楚
使用ICETOOL。这里
是指向 IBM DFSORT 编程指南
(ICETOOL 只是 DFSORT 的 BATCH 前端)让您了解您要做什么
正在对抗。

我建议采用另一种方法。尝试编写 REXX 过程来替换
ICETOOL 步骤。捕获 LISTDS 输出并将其格式化为
适当的 IDCAMS REPRO/DELETE 命令将是一个更简单的过程。

REXX 几乎在每台 IBM 大型机上都可用,因此访问应该不成问题。

如果需要,请提供有关数据集命名约定的更多详细信息
对此有更多帮助。特别是输出 PDS 名称。我不需要也不想要
确切的名称,以及它们的构造方式。例如,他们看起来有什么吗?
像这样:

  • HLQ.SOMENAME.FILE001
  • HLQ.SOMENAME.FILE002
  • HLQ.SOMENAME.FILE003

其中前 100 个成员复制到 FILE001,接下来的 100 个复制到 FILE002
等等。这可以使你的概括程度有所不同
文件复制实用程序。另外,您是否会以 100 块为单位继续复制,直到
输入 PDS 已耗尽或是否存在某种停止限制?

You could do this in several job steps. As an outline:

  • Trap the output from LISTDS 'input-pds-name' MEMBERS into a dataset
  • manipulate the MEMBERS list with ICETOOL to produce IDCAMS REPRO and DELETE commands
  • run the IDCAMS REPRO
  • run the IDCAMS DELETE

Setting up ICETOOL to select and format the MEMBERS list into REPRO/DELETE commands
is, by far, the most difficult step. In fact you might need to chain a couple
of ICETOOL steps to get all straight. This could take a very long time
to figure out unless you have a lot of experience
using ICETOOL. Here
is a link to the IBM DFSORT Programming Guide
(ICETOOL is just a BATCH front end to DFSORT) to give you some idea of what you
are up against.

I suggest an alternative approach. Try writing a REXX procedure to replace the
ICETOOL step. Trapping the LISTDS output and formatting it into the
appropriate IDCAMS REPRO/DELETE commands would be a much simpler process.

REXX is available on pretty much every IBM mainframe so access should not be a problem.

Please provide a bit more detail on your dataset naming conventions if you need
more help with this. Particularly, the output PDS names. I don't need or want
exact names, just how they are constructed. For example do they looks something
like this:

  • HLQ.SOMENAME.FILE001
  • HLQ.SOMENAME.FILE002
  • HLQ.SOMENAME.FILE003

where the first 100 members are copied into FILE001, the next 100 to FILE002
etcetera. This can make a difference in how generalized you can make
the file copy utility. Also, do you keep copying in blocks of 100 until
the input PDS is exausted or is there some stopping limit?

羁拥 2024-10-02 20:13:26

如果您有一款名为“SAS”的产品,那么将选定的成员从一个 PDS 复制到另一个 PDS 将非常容易。

DATA PDS;                                              
FILENAME OLD 'A*.B*.C*' DISP=SHR;              
FILENAME NEW 'A*.B*.D*' DISP=OLD;
PROC PDSCOPY INDD=OLD OUTDD=NEW ALIASMATCH=BOTH        
SHAREINPUT;                                      
SELECT  AJ:;                                        
RUN;                                                   

注意:所有以 AJ 开头的成员都将从旧数据集复制到新数据集。

If you have a product called "SAS' then it will be very easy to copy selected members from one PDS to other.

DATA PDS;                                              
FILENAME OLD 'A*.B*.C*' DISP=SHR;              
FILENAME NEW 'A*.B*.D*' DISP=OLD;
PROC PDSCOPY INDD=OLD OUTDD=NEW ALIASMATCH=BOTH        
SHAREINPUT;                                      
SELECT  AJ:;                                        
RUN;                                                   

Note: All the members starting with AJ will copy from old to new dataset.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文