简体   繁体   English

CL(IBM i系列)中的程序可以淘汰库对象?

[英]Program in CL (IBM i series) that retires library objects?

I have four libraries where each has a different selection of a set of programs. 我有四个库,每个库都有一组不同的程序集。 Unfortunately i cannot delete the unused programs in the library with SQL, since i need to retire them (so they don't stay on our clients servers). 不幸的是,我无法使用SQL删除库中未使用的程序,因为我需要淘汰它们(因此它们不会留在我们的客户端服务器上)。

Is there a way to make a CL program for this? 有没有办法为此制作一个CL程序? Our senior programmer says that it cant be done, but i want to explore every possibility before being forced to manually retire 2300 objects. 我们的高级程序员说无法做到这一点,但我想在被迫手动淘汰2300个对象之前探索各种可能性。

It is originally a function within Aldon change management software and I do have a SQL query for selecting the objects needed. 它最初是Aldon变更管理软件中的功能,我确实有一个SQL查询来选择所需的对象。

I'd guess it's too late to help the original poster, but for future reference... 我想为原始海报提供帮助已经为时已晚,但仅供将来参考...

"Retire" is a concept used by the Rocket Aldon Lifecycle Manager for IBM i, aka Aldon LM(i). “退休”是Rocket Aldon生命周期管理器用于IBM i(又名Aldon LM(i))的概念。 A change management system (CMS) for the IBM i. IBM i的变更管理系统(CMS)。

Note that most if not all the Aldon screens respect the standard IBM i UI function of F13-Repeat, to fill the option field of all subfile records with the same value. 请注意,大多数(即使不是全部)Aldon屏幕都遵循F13-Repeat的标准IBM i UI功能,以便用相同的值填充所有子文件记录的选项字段。

So, check out all the objects to a single task. 因此,将所有对象签出到单个任务中。 Using the ACMSCHKOUT or ACMSADDPJO commands if you want. 如果需要,请使用ACMSCHKOUT或ACMSADDPJO命令。

Then it's simply a matter of going into the Work with Objects screen for the objects on that task, putting an option 25-Retire of the first object and pressing F13-Repeat to repeat the option for all objects then just hitting enter. 然后,只需进入该任务中的对象的“使用对象”屏幕,将第一个对象的选项25-退出,然后按F13-Repeat以对所有对象重复该选项,然后按Enter。

Promote and deploy the task as normal. 正常升级和部署任务。

I don't understand the difference between retire and delete in your context but here is a sample CL to read a file of program objects and delete them. 我不了解在您的上下文中退休和删除之间的区别,但这是一个示例CL,用于读取程序对象文件并删除它们。

It assumes as input a file named DLTFILE with the fields LIB and PGM . 它假定输入一个名为DLTFILE与领域LIBPGM文件。

PGM

DCLF FILE(DLTFILE)
LOOP: RCVF RCDFMT(DLTFILE)
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(BREAK))
DLTPGM(&LIB/&PGM)
GOTO CMDLBL(LOOP)

BREAK: ENDPGM

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM