百 客户通讯 - bayss.comfor z/vm. openstack is an infrastructure as a service (iaas) cloud...

33
百硕同兴科技(北京)有限公司 BAYSHORE CONSULTING AND SERVICES CO.,LTD. 客户通讯 Bayshore Advisor 欢迎关注我们的微信公众平台 微信号:bayshore_advisor 总第34期 2014年6月

Upload: others

Post on 02-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

百硕同兴科技(北京)有限公司BAYSHORE CONSULTING AND SERVICES CO.,LTD.

客户通讯百硕 Bayshore Advisor

欢迎关注我们的微信公众平台微信号:bayshore_advisor

总第34期 2014年6月

Page 2: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

1 百硕客户通讯 总第 34 期 2014 年 6 月

Contents

消息快递 2 Virtualization on System z using Enterprise Linux

Server, z/VM and z/VM Wave

百硕技术顾问 Martha Hall

经验分享 8 生产系统 CICS 监控策略

百硕工程师 岑宇

11 Console Message 面纱背后

百硕工程师 陆书博

百硕博客 18 主机用户密码重置自动化工具

百硕工程师 彭小川

专家问答 21 The Storage sub-system frequently Ask

百硕外籍技术顾问 Fuddin

来稿选登 28 AMODE 和 RMODE

郭金磊

百硕客户通讯

BAYSHORE ADVISOR

中国主机用户专享的资讯季刊

2014 年 6 月出版(总第 34 期)

本期责任编辑:陈银波

统筹、排版:彭晰遥、吴昊

封面制作:关硕

校对:康会影、彭晰遥

主办:

百硕同兴科技(北京)有限公司

出版:百硕客户通讯编委会

吕 宁

王晓兵

徐卫华

邹 杰

高春霞

刘京平

高大川

陈银波

马彤雷

张连蒙

罗兴魁

贺 明

康会影

彭晰遥

Martha Hall

地址:北京市朝阳区望京科技园利泽

中二路 1 号中辰大厦 209 室

电话:010 - 64391733

传真:010 - 64391582

电子邮箱:

[email protected]

如果您对百硕客户通讯有任何意见

和建议,欢迎您随时与我们交流。

Page 3: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

2 百硕客户通讯 总第 34 期 2014 年 6 月

Virtualization on System z using Enterprise

Linux Server, z/VM and z/VM Wave 文 / 百硕外籍技术顾问 Martha Hall

Introduction

Irtualization is a big trend in the IBM mainframe arena currently. There are several

reasons for this. The trend to continue to consolidate many servers onto the IBM z

platform is continuing to grow. In addition, virtualization is a foundation of cloud

computing and cloud computing is another critical trend. Cloud Computing is based on

virtualization and standardization. In order to position the various technologies it is necessary

to first understand that Cloud computing is a journey beginning with virtualization and the

consolidation of environments and ending with workload pattern-based deployment of IT

services.

Virtualization has been built into the IBM mainframe since the beginning. The VM platform,

now z/VM, continues to be an important component of the mainframe. I first worked on VM in

the 1970’s when it was used to do migration from older DOS/VS systems, now VSE, to

MVS. Both the DOS/VS and MVS systems were built to run as VM guests so that we could

test the functionality on the same mainframe which was a System/370 Model 158. I

remember it was an exciting project since we felt we were on the forefront of technology at

the time.

System z provides virtualization technology via logical partitioning (LPAR) and software

partitioning (z/VM). PR/SM supports both LPAR and z/VM. z/VM can support any IBM

Operating system running as a guest machine.

The Integrated Facility for Linux (IFL) is a processor dedicated to Linux workloads on IBM

System z servers. The IFL is supported by the z/VM virtualization software and the Linux

operating system; it cannot run other IBM operating systems.

Enterprise Linux Server, z/VM and z/VM WAVE

The IBM Enterprise Linux Server has the server and virtualization capabilities to run a large

number of parallel workloads effectively. It can share system resources at high levels of

utilization. It provides efficient virtualization management helping to achieve superior levels of

service and trusted and operational efficiency.

V

>>> 消息快递

Page 4: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

3 百硕客户通讯 总第 34 期 2014 年 6 月

The Enterprise Linux Server is a Linux ready IT infrastructure solution now available from

IBM. The Enterprise Linux Server can support the consolidation of up to 60 older x86 and

UNIX cores onto a single Enterprise Linux Server IFL. This results in a cost reduction, since

software licensing costs for Linux are usually priced per IFL. The ELS (Enterprise Linux

Server) configuration includes an IBM zEnterprise server, the server maintenance, IBM z/VM

virtualization and z/VM features, IBM Wave for z/VM virtualization management and the

support and subscription for the software.

The Enterprise Linux Server includes the server with dedicated Linux cores which are also

called Integrated Facility for Linux – IFL2, memory and I/O connectivity. The configurations

available for the different servers are:

Enterprise Linux Server based on a zBC12:

2 IFL processors minimum (maximum 13 IFLs)

28 to 32 GB memory per IFL

8 FICON® ports

8 OSA ports

Enterprise Linux Server based on a zEC12:

6 IFL processors minimum (maximal 101 IFLs),

32 GB memory per IFL (except in cases where the configuration increment rules don't

support),

24 FICON ports,

8 OSA ports

Enterprise Linux Server based on a z114:

2 IFL processors minimum (maximum 10 IFLs)

24 GB memory per IFL up to 5 IFLs; 32 GB memory per IFL for 6 IFLs to 10 IFLs

8 FICON ports

8 OSA ports

Enterprise Linux Server based on a z196:

6 IFL processors minimum (maximum 80 IFLs),

32 GB memory per IFL (except in cases where the configuration increment rules don't

support this),

24 FICON ports,

8 OSA ports

Also included are:

3 -5 years maintenance for the zEnterprise server and all server components (1 year

warranty and additional years pre-paid).

Page 5: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

4 百硕客户通讯 总第 34 期 2014 年 6 月

Additional server components can be included optionally with all options.

The virtualization software includes:

z/VM Version 6

z/VM Directory Maintenance Facility

z/VM Resource Access Control Facility

z/VM Performance Toolkit for VM

z/VM RSCS Feature

IBM Wave for z/VM Version 1.1

Linux is not included. Linux can be ordered from the Linux distributors Red Hat or SUSE.

Both Red Hat and SUSE provide offerings for the Enterprise Linux Server.

In August last year, IBM purchased CSL International (CSL). CSL had developed a product

called CSL-WAVE which clients use to manage and monitor their z/VM and Linux on System

z environments using an efficient graphical interface. It is a simple, intuitive virtualization

management tool for a z/VM environment supporting Linux virtual servers. IBM WAVE for

z/VM 1.1 became available on February 28th, 2014. It supports z/VM 6.3, z/VM 6.2 and z/VM

5.4. The product helps to simplify management and administration of a z/VM environment by

abstracting z/VM resources and providing a GUI to automate z/VM functions. z/VM WAVE is

an important part of the Enterprise Linux Server offering. This user interface can be used to

manage virtual servers and resources that would otherwise need to be performed with z/VM

system commands by a skilled z/VM systems programmer. Point and Click operations are

available to:

Perform basic z/VM guest actions such as activate, deactivate, recycle, pause and

resume

Provisions virtual resources such as z/VM guests, network and storage

Capture and clone virtual servers across LPARs

Create and configure vSwitch and guest LANs

Connect virtual servers to virtual networks

Install Linux on a virtual guest

Relocate virtual guests with live guest relocation

Display and monitor page and SPOOL and add and remove disks

Provision and track used or free OSA and Hipersocket devices using Device Pools

Support advanced z/VM management capabilities such as Live Guest Relocation with a

few clicks

Manage storage using the Manage Storage Wizard that enables management at the

z/VM level such as dedicating devices, adding minidisks, as well enabling management

on the Linux level such as the creation and expansion of LVM volume groups, regular

partitions, and logical volumes and adding FCP attached storage to z/VM guests.

In short z/VM Wave provides intelligent virtualization by shortening the learning curve

Page 6: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

5 百硕客户通讯 总第 34 期 2014 年 6 月

needed to manage complex environments, organize and simplify the management of z/VM

and virtual Linux servers and view servers and storage utilization graphically. In addition to

these operations, z/VM Wave provides automatic detection and monitoring of resources.

The WAVESRV Linux guest server runs within a z/VM LPAR or as a native Linux for System

z partition on PR/SM. It can run on Red Hat Enterprise Linux version 6 or SUSE Linux

Enterprise Server 11.

The Enterprise Linux Server concept makes it easy to develop, implement and manage the

following recent trends for IT.

Web serving, JAVA, and Business Applications

The Enterprise Linux Server is an excellent choice to host Web and all kind of Java or

business applications. The IBM WebSphere family offers a Java environment, and many

independent software vendors, like SAP, offer their products on the Enterprise Linux Server

as well. Often it is a simple re-compile of the Linux software to get it run on an Enterprise

Linux Server.

Cloud Computing

Enterprise Linux Server and its associated system software support cloud adoption via the

comprehensive capabilities provided with the IBM Cloud and Smarter Infrastructure solutions,

including Tivoli software, the z/VM virtualization software that will be manageable with the

OpenStack architecture based interfaces and the virtualization management tool IBM Wave

for z/VM.

OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM

joined the project in 2012 and in support of System z is making contributions to the

OpenStack project that are designed to enable z/VM V6.3 to be the first System z operating

environment that can be managed with these open cloud architecture-based interfaces.

Application Development

The Enterprise Linux Server is capable of isolating multiple execution environments,

therefore one or more virtual Linux servers can be easily created for each developer, for a

quick rebuild for development and test servers for example, isolated from other developers or

production servers. The IBM Rational Software Development Platform provides a

comprehensive, well-integrated development platform.

Security

The Enterprise Linux Server offers an attractive foundation on which to build a

comprehensive IT security infrastructure. Numerous security applications and tools are

Page 7: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

6 百硕客户通讯 总第 34 期 2014 年 6 月

available from IBM and ISVs that provide a complete and cost-effective security

infrastructure.

Conclusion

The Enterprise Linux Server hardware provides the foundation with functions critical to the

success of virtualization, particularly on a large scale, such as the ability to partition the

server, device sharing, and inter-partition communication.

The z/VM virtualization software enables to run a large number of Linux server images on a

single Enterprise Linux Server. z/VM provides function and technology exploitation that helps

to virtualize processors, memory, communications, I/O and networking resources, with the

potential to reduce the need to plan for, purchase, and install hardware to consolidate and

deploy workloads.

IBM Wave helps you to achieve extreme virtualization with z/VM by improving the ability to

manage highly virtualized environments running Linux virtual servers.

The combination of these three functions can help a customer kickstart the virtualization

process and help assist in the cloud development process.

There are many other programs, both from IBM and ISV’s that are available for use in this

environment.

References

Advanced z/VM Systems Management Share Anaheim

(Session 14793)

March 14th, 2014

Oliveira, Horn, Dobos IBM

The Enterprise Linux Server

Frequently Asked Questions

February, 2014

ZSQ3043-USEN-07

IBM Wave for z/VM (IBM Wave)

Frequently Asked Questions

February, 2014

ZSQ03067-USEN-01

Page 8: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

7 百硕客户通讯 总第 34 期 2014 年 6 月

IBM Wave for z/VM - Installation, Implementation and Exploitation

Draft Redbook

February 26, 2014

SG24-8192-00

Set up Linux on IBM System z for Production

Redbook

November, 2013

SG24-8137-00

A Success story for Linux ELS and hardware consolidation German financial SaaS

company EFiS

http://www-03.ibm.com/software/businesscasestudies/en/us/eserverzseries?docid=STRD-

8VVEU5

The need:

EFiS EDI Finance Service AG (EFiS) needs computing systems that are powerful and stable

enough to support 24/7 availability, and technology that is flexible enough to support

fluctuating capacity demands.

The solution:

EFiS implemented an IBM System z® Solution Edition for Enterprise Linux based a new IBM

zEnterprise® 114 server. It also uses IBM WebSphere® software to manage its application

environment.

The benefit:

Doubled processing speeds by replacing obsolete and underperforming hardware with a

new IBM System z infrastructure. Delivered more than 30 percent savings in energy

consumption through hardware consolidation and improved resource utilization. Improved

processor utilization levels and reduced investment in costly software license fees, delivering

instant cost savings.

Page 9: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

8 百硕客户通讯 总第 34 期 2014 年 6 月

生产系统 CICS 监控策略

文 / 百硕工程师 岑宇

生产环境中,问题的处理原则是以快速恢复生产正常运行为主,所以监控的重点在于预防和

及时发现问题,同时做一些可以实现的自动处理。为了达到此目的,通常是对关键的指标设

置自动报警,通过工具来实现部分自动处理,不能自动处理的问题,能及时让维护人员知道

问题的发生,从而尽快进行人工处理。

生产环境 CICS 常见的问题如下:

1. CICS 地址空间 CPU 使用率过高。

2.CICS 内存不足导致 SOS(包括 DSA/EDSA)。

3. 交易运行缓慢,交易堆积。

4. CICS 达到 MAX TASK 或者长期处于 MAX TASK 状态。

5. CICS 重要资源不可用,比如活动的 Session 数不足,Connection 状态异常,长挂交易异常结束

等。

在 CICSPLEX 的环境下,各 CICS Region 运行相对独立的同时,交易对 DB2/VSAM 等数据的

访问依然是统一的,所以某一个 CICS Region 异常,通常会影响到其它的 CICS Region,我们要在

众多的 CICS Region 中及时发现并处理问题,在不借助监控工具的情况下,其实是很困难的。例如,

我们要在多个 CICS 中找到没有结束且运行时间最长的交易,如果没有监控工具,则需要登陆每一个

CICS 进行查看对比,这会消耗大量的时间,解决生产故障,要求准确快速,避免问题的扩大。如果

有监控工具(比如 BMC 的 MAINVIEW for CICS),只需要在一个界面上显示所有 CICS 的所有交易,

然后按照运行时间倒序排列即可定位可能的问题交易。

监控工具在主机的运维中,起着很重要的作用。比较常见的主机监控工具有:IBM OMEGAMON,

BMC MAINVIEW,CA SYSVIEW 等。本文主要以长期运行在某大型银行的 BMC MAINVIEW(以

下简称 MVCICS)为例,来介绍监控工具在生产环境中的使用。

报警有几个方面的问题需要考虑:

1.针对哪个 KPI 的报警。

2.报警阀值。

3.不同业务时间段,阀值可能不同(例如,在早上 9~11 点,下午 1~4 点这些交易量较大的时间段,

与凌晨交易较少的时间段对比,CICS 的 CPU 使用率,交易平均响应时间等 KPI 的正常阀值都不一

样。为了做到精准报警,需分时段设置不同阀值)。

4.根据不同应用系统设置不同的阀值。

5.数据采集的频率。一般来说,监控工具都有一个采样的频率。比如每个 30 秒,采集一次数据,如果

经验分享 <<<

Page 10: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

9 百硕客户通讯 总第 34 期 2014 年 6 月

采集到的数据满足报警条件,则发出报警。

主要 KPI 的报警部署:

1. CICS Region CPU 使用率的报警

CICS Region 的 CPU 使用率是逻辑 CPU%,所以需要根据 CPU 的个数,WLM 里的设置等实际

情况设置阀值。通常,在交易高峰期,以达到可用 CPU%的 80%为 Warning 值,以 90%为 Critical

值。

2. CICS 内存使用率的报警(包括 DSA、EDSA)

通常 Warning 级别的报警设置在 80%;Critical 级别的报警设置在 90%。

3. CICS MAX TASK 报警

通常 Warning 级别的报警设置在 80%;Critical 级别的报警设置在 90%。

4. CICS 长时间处于 MAX TASK 状态的报警

CICS 偶尔达到 MAX TASK 不一定是系统故障,可能只是瞬间的交易量过大导致。所以 MAX TASK

还需要设置另外一种报警:CICS 长期处于 MAX TASK 状态的报警。MVCICS 的策略是,可以设置

采样频率及次数。例如:每 30 秒采样一次,如果连续采样 2 次都达到报警阀值,则认为系统的 MAX

TASK 状态持续了 1 分钟。可以根据需要设置频率和期望的持续时间很方便灵活的设置报警阀值。

通常 Warning 级别的报警设置在 80%;Critical 级别的报警设置在 90%。

5.交易 Elapse time 报警

根据交易的实际性能情况设置阀值,一般可以设置非长挂交易响应时间超过 1 分钟报警。对于可以

做 Purge 的交易,建议在报警的同时,自动 Purge 交易。这样可以避免异常交易长时间占用资源而

引发交易堆积,交易运行缓慢等后续故障的产生。

自动 Purge 交易有多种方式,常见的主要有两种:

1).通过监控工具发送交易超时信息到 LOG,利用 SA 等工具扫描 LOG 读取 LPAR,CICS 名,交易

名,TASK 号等信息,通过向 CICS 发命令来 PURGE 交易。这种做法的问题是,报警本身就有数据

采样频率,SA 也有扫描的频率,当交易发生问题时,不能快速的处理问题交易。

2).利用监控工具部署在 CICS 的出口程序,直接发 ABEND 命令结束交易。MVCICS 的自动 Purge

交易功能就采用这种方式。这种方式的好处是,不依赖于报警及采样频率,当交易达到 Purge 阀值时,

第一时间准确的直接结束交易。

6. 设置监控 Connection 的状态,以及 Session 的活动数报警。

Connection 的状态为 Released 则报警;Session 活动数一般低于 80%报 warning 信息,低于

70%报 Critical。同时通过 SA 等工具来实现自动激活,也可以通过 MVCICS 的 Auto Operator 工

具来实现。

Page 11: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

10 百硕客户通讯 总第 34 期 2014 年 6 月

7. 监控长挂交易的报警

当长挂交易异常结束时,自动报警或自动重启该交易。MAINVIEW for CICS 提供了强大的客户化

功能,这种需求在 MVCICS 中可以很容易实现。

以上方案覆盖了 CICS 比较通用的的监控点,如果大家在实施过程中有不清楚,或者有其他的监控需

求,可以与我们联系。

Page 12: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

11 百硕客户通讯 总第 34 期 2014 年 6 月

Console Message 面纱背后

文 / 百硕工程师 陆书博

1. 前言

机工程师问题诊断的第一手资料是 MESSAGE,但是工程师一般只关注 MESSAGE

的 主 体 部 分 , 容 易 忽 视 其 他 部 分 。 笔 者 基 于 HARDCOPY LOG

(SYSLOG&OPERLOG)中显示的 MESSAGE 给大家简单介绍一下其结构。

2. MESSAGE 处理流程

MESSAGE 是指由 WTO(Write To Operator)或 WTOR(Write To Operator Reply)宏将指

定的文本内容发到 CONSOLE 或 LOG。WTO 是向操作人员发送提示信息,WTOR 是向操作人员发

送回复请求信息。

MESSAGE 的处理流程:

1. 程序通过 WTO/WTOR 宏发出 MESSAGE;

2. MPF 处理 MESSAGE,如设置 MESSAGE 是否由 SSI 继续处理;

3. SUBSYSTEM 通过 SSI 处理指定的 MESSAGE;

4. MESSAGE 写入 HARDCOPY LOG;

5. 系统将 MESSAGE 发送到合适的 MCS(Multisystem Console Support)CONSOLE 和

Extended MCSCONSOLE 上;

经验分享 <<<

Page 13: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

12 百硕客户通讯 总第 34 期 2014 年 6 月

6. SYSPLEX 环境中 MESSAGE 通过 XCF 服务广播到其他系统,在接收系统上 SSI 会再处理一

次 MESSAGE,之后系统将 MESSAGE 发送到 CONSOLE。

3. 组成结构

基于 MESSAGE 在 LOG 中的显示内容,笔者将其组成部分分为以下三类:

显示部分:Message Type、Routing Code、系统名、日期、时间、Owner、Request Flag、

Message Text。

不显示部分:Descriptor Code。

隐性显示部分:Message type Code。

4. 组成结构详解

本文主要关注 Type、Routing Code、Owner、Request Flag、Descriptor Code 和 code,其

他容易理解的部分就不做过多说明。

4.1 MESSAGE TYPE

从不同角度对 MESSAGE 进行分类:

根据结构不同,MESSAGE 分为 SINGLE-LINE(SLWTO)和 MUTIL-LINE(MLWTO),

即单行 MESSAGE 和多行 MESSAGE。

根据目的不同,MESSAGE 分为 SOLICITED 和 UNSOLICITED。SOLICITED 响应操作

员命令,UNSOLICITED 独立于命令之外。

根据重要程度不同,MESSAGE 分为 WAIT、ACTION 和 INFORMATION,笔者在

MESSAGE TYPE CODE 部分单独说明。

LOG 中 MESSAGE 的第 1 部分为 Record Type,用以表示 MESSAGE 类型,由两列组成:

第 1 列内容:

N - single-line message

Page 14: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

13 百硕客户通讯 总第 34 期 2014 年 6 月

S - continuation of previous line

W - single-line message with reply

M - first line of a multi-line MESSAGE

L - multi-line message label line

D - multi-line message data line

E - multi-line message data/end line

O - LOG command input

X - non-hardcopy or LOG command source

第 2 列内容:

C - command issued by operator

R - command response message

I - internally issued command

Record Type 可以单独显示,也可组合显示,例如 N 表示 UNSOLICITED SLWTO,NR 表示

SOLICITED SLWTO。

LOG 中多行 MESSAGE 不一定是 MLWTO,可能为长段的 SLWTO,由于设备显示限制而扩

展到下一行,如下所示:

N 0020000 ADCD113 14148 12:26:10.04 STC03187 00000290 IEF695I START SMFDUMPS WITH JOBNAME SMFDUMPS IS ASSIGNED TO USER START2

S , GROUP SYS1

MLWTO 像是多个 SLWTO,每行 MESSAGE 都会经由 MPF 和 SSI 处理,行与行之间关联但不

衔接,如下所示:

NC0000000 ADCD113 14148 15:11:04.06 IBMSE05 00000290 D M=STORAGE

MR0000000 ADCD113 14148 15:11:06.55 IBMSE05 00000090 IEE174I 15.11.04 DISPLA

LR 765 00000090 REAL STORAGE STATUS

DR 765 00000090 ONLINE-NOT RECONFIGURAB

DR 765 00000090 0M-1024M

DR 765 00000090 ONLINE-RECONFIGURABLE

DR 765 00000090 NONE

DR 765 00000090 PENDING OFFLINE

DR 765 00000090 NONE

ER 765 00000090 STORAGE INCREMENT SIZE

4.2 ROUTING CODE

系统通过 Routing Code 为 MESSAGE 选择目标 CONSOLE。MESSAGE 的 Routing Code

由 WTO 宏 的 ROUTCDE 参 数 设 置 , 范 围 1 到 128 。 如 果 编 程 时 忽 略 ROUTCDE 和

CONSID/CONSNAME 参数,则 Routing Code 为 0。

在定义 CONSOLE 时用户可通过 ROUTCODE 参数对 CONSOLE 接收 MESSAGE 进行限制,

从而对 MESSAGE 分流。

各类 CONSOLE 都不会显示 MESSAGE 的 Routing Code,但是 LOG 会显示部分 Routing

Page 15: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

14 百硕客户通讯 总第 34 期 2014 年 6 月

Code(1 到 28),我们可以利用它来判断罕见 MESSAGE 的来源。

LOG 中 MESSAGE 的第 2 部分使用 7 位十六进制数表示 Routing Code,用户需要将其转换成

二进制,通过位记录来确定 Routing Code。如下例:

N 4000000 ADCD113 14148 07:48:13.36 00000090 IEE360I SMF NOW RECORDING ON SYS1.MAN1 ON ZDSYS1 TIME=07.48.13

MESSAGE 第 5 部分为 X’4000’,代表 Routing Code 为 2:

Hexadecimal: 4 0 0 0

Binary: 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Routing Codes: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

笔者在这里列出部分 Code,具体含义可查看官方手册“z/OS MVS Routing and Descriptor

Codes”:

Code Meaning Code Meaning

1 Operator Action 8 Teleprocessing Control

2 Operator Information 9 System Security

3 Tape Pool 10 System/Error

Maintenance

4 Direct Access Pool 11 Programmer Information

5 Tape Library 12 Emulation

6 Disk Library 13-20 For customer use only.

7 Unit Record Pool 21-28 For subsystem use only

4.3 JOBID/STCID/TSUID/CONSOLE

LOG 中 MESSAGE 的第 6 部分为 JOBID/STCID/TSUID/CONSOLE,即 MESSAGE 的

owner。如果此列为空白,表示 CONSOLE 未获取 MESSAGE 的来源和目标信息,例如 RACF 用

户越权行为 MESSAGE 的 owner 为空。用户需要注意其中两个特殊 CONSOLE:

INTERNAL– 表明 MESSAGE 由问题程序或系统自身产生(例如 PROCEDURE 出错),

并且 MESSAGE 会发送到 SYSPLEX MCS CONSOLE 上。

INSTREAM– 表明 MESSAGE 是由发系统命令的 JCL 产生的。

4.4 REQUEST FLAGS

Request Flag 表明 MESSAGE 当前属性,例如 MESSAGE 的 text 是否被修改过,或

MESSAGE 否经由 MPF 处理等信息。

Page 16: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

15 百硕客户通讯 总第 34 期 2014 年 6 月

LOG 中 MESSAGE 的第 7 部分使用 8 位十六进制数表示 Request Flag 值,第 7 列数据字典如

下:

8....... - MESSAGE text changed

4....... - route codes changed

2....... - descriptor codes changed

1....... - MESSAGE queued to specific active CONSOLE

.8...... - unused

.4...... - MESSAGE queued by route codes only

.2...... - CONSOLE ID was changed

.1...... - minor lines of MLWTO processed by exit

..8..... - the MESSAGE was deleted (this never appears!)

..4..... - suppression was overridden (DISPLAY was forced)

..2..... - forced to hardcopy (LOG forced)

..1..... - bypass hardcopy (this never appears!)

...8.... - forced to hardcopy only (LOG and NODISPLAY)

...4.... - broadcast

...2.... - don't broadcast

...1.... - don't retain in AMRF (NORETAIN)

....8... - retain in AMRF (RETAIN)

....4... - retrieval key changed

....2... - 4-byte CONSOLE ID changed

....1... - MESSAGE type changed

.....8.. - do not automate (set by MPFLSTxx and NOAUTO)

.....4.. - automate (set by MPFLSTxx)

.....2.. - MESSAGE issued hardcopy-only

.....1.. - MESSAGE was undelivered

......8. - MESSAGE not serviced by any exit

......4. - ESTAE error in IEAVX600

......2. - MESSAGE not serviced, incompatible request

......1. - automation requested (AUTO)

.......8 - not queued to any CONSOLE

.......4 - suppressed by subsystem

.......2 - suppressed by exit (NODISPLAY)

.......1 - suppressed by MPF (set by MPFLSTxx and NODISPLAY)

每一位由 4 个数字组合而成,这 4 个数字可以单独显示,也可累加显示,一位的最大值为 X‘C’。

如下例:

NC0000000 ADCD113 14119 09:13:08.53 INSTREAM 00000290 LOGON

MESSAGE Request Flag 为‘00000290’,表示第 6 位为 X‘2’,第 7 位为 X‘8’+X‘1’

=X‘9’,MESSAGE 的属性为 HARDCOPY-ONLY、未经过出口程序处理并由 MPF 设置为 AUTO。

Page 17: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

16 百硕客户通讯 总第 34 期 2014 年 6 月

4.5 DESCRIPTOR CODE

Descriptor Code 描述 MESSAGE 的重要性,确定 MESSAGE 类型,同时也决定 MESSAGE

在系统的显示方式。开发人员通过 WTO 宏的 DESC 参数指定 Descriptor Code,如忽略则为 0。

笔者在这里列出部分 Code,具体含义可查看官方手册“z/OS MVS Routing and Descriptor

Codes”:

Descriptor Code Meaning Descriptor Code Meaning

1 System Failure 8 Out-of-Line

2 Immediate Action Required 9 Operator's Request

3 Eventual Action Required 10 TRACK Command Response

4 System Status 11 Critical Eventual

Action Required

5 Immediate Command

Response

12 Important Information

6 Job Status 13 Automation Information

7 Task-Related 14-16 Reserved for future use

4.6 MESSAGE TYPE CODE

Message Type Code 表示 MESSAGE 类型,根据 MESSAGE 重要程度,系统将其分为三大

类,六小类。

Type Type Code Meaning Action Descriptor

Code

WAIT W (wait) system failure processing stops

until perform a

required action

1

ACTION A (action) immediate Action perform a specific

action

2

D (decision) immediate Action choose an alternative2

E (eventual

action)

eventual action

notimmediate

perform action 3

CE (critical

eventual action)

eventual action of

critical importance

perform action

immediately

11

INFORMATION I (information) system status No action 4-10、12、

Page 18: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

17 百硕客户通讯 总第 34 期 2014 年 6 月

13

Message Type Code 和 Descriptor Code 是相关联的,用户只能通过设置 Descriptor Code

来确定 MESSAGE 的 Type Code。另外,CONSOLE 的 LEVEL 参数和 Type Code 相对应,可用

于 MESSAGE 分流。

笔者为何说这部分为隐性显示?因为很多 MESSAGE ID会通过末位字符来表示 Message

Type Code,例如 IGD17433I 为 SMS 的 information 类信息。但我们需要注意,MESSAGE ID 的

末位字符和 Message Type Code 不是完全匹配,MESSAGE 重要性还需通过官方手册确定。系统

核心组件 MESSAGE ID 末位‘W’一般表示 WAIT,如 IEA020W 引发系统 WAIT,但各类系统产

品的 MESSAGE ID 末位‘W’一般表示 WARNING。

MESSAGE ID 是 text 的一部分,WTO/WTOR 宏本身没有 MESSAGE ID 参数,程序开发

人员按照规定格式在 text 的开始部分加上标签,便于在数据字典查找相应的内容。MESSAGE ID 前

3 位一般标识系统组件或产品,最后 1 位用于标识 MESSAGE 类型。

5. 结束语

以上内容为笔者对 MESSAGE 的理解,希望可以对大家的问题分析工作有所帮助。

Page 19: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

18 百硕客户通讯 总第 34 期 2014 年 6 月

主机用户密码重置自动化工具 文 / 百硕工程师 彭小川

为Mainframe这一行业的技术人员,相信大家都遇到过主机用户Revoke,需要密码重置的

问题。在日常工作中,我总结了密码重置的原因主要有两点:一是基于安全考虑,当用户使

用一段时间后,RACF会强制要求用户更换密码,或者当他人恶意尝试登录超过一定次数时,

RACF会自动将此用户Revoke,从而需要密码重置;二是由于个人原因,用户忘记密码,需要进行密

码重置。

一般而言,开发测试环境都会有大量的用户和多个系统。在主机ID Revoke后,用户需要按照相

关流程找RACF管理人员进行密码重置,RACF管理人员收到申请后,首先需要查看此ID是否属于该

用户,然后登陆系统进行密码重置,最后将处理结果反馈给用户。这样就有可能会因为某个环节没有

沟通好,导致不能及时有效的处理,从而影响用户的工作效率。因此我们编写了“主机用户密码重置

自动化工具”,使用该工具,用户可以及时且只能对自己的主机ID进行密码重置或者Resume操作,

从而在保证安全性的基础上提高了效率。目前,该工具已投入某行开发环境使用,从使用结果来看,

不仅简化了之前密码重置的流程,提高了效率,而且在MYSQL数据库中还有详细记录,方便RACF

人员进行查询和管理。

“主机用户密码重置自动化工具”主要使用了PHP编程,MYSQL数据库,JAVA,C语言和邮件

服务器等相关技术编写完成。其操作和原理主要由以下两步完成:

第一步,用户通过PHP登陆页面,选择相应的“系统名”,填写“用户名”,选择“密码重置”

或者Resume操作。如下图所示:

>>> 百硕博客

Page 20: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

19 百硕客户通讯 总第 34 期 2014 年 6 月

为了实行这一步,首先我们需要整理“主机ID”和“所属人”以及“邮箱”等对应表,将其导入

至MYSQL数据库PWD_USERTABLE表中。PWD_USERTABLE表中的字段为:“主机ID”、“该

用户所属人的邮箱地址”、“对应的系统名称”和“所属人的姓名”。PHP程序会根据用户“登陆页

面”的信息在数据库中进行查询,如果登录页面中的“系统名”和“用户名”与数据库中相匹配,PHP

程序会根据“系统名”、“用户名”和“时间”生成一个带有MD5码的唯一的URL,并且程序会通过

邮件服务器将此URL发送至“用户名”对应的邮箱中,这样就可以确保用户只能对自己的主机ID进行

操作。此外PHP程序中还对MYSQL数据库做了Insert操作,将“用户名”、“系统名”、“时间”

以及“MD5码”插入到MYSQL数据库PWD_ACTION表中。当然,如果登陆页面中的信息与数据库

中查询的结果不匹配,则会有相应的提示信息,然后直接退出,不会做相应的Insert操作。

第二步,用户将邮箱中的URL粘贴至IE浏览器完成“密码重置”或者“Resume”操作。下图为

“邮件服务器”发送到用户邮箱的信息:

实行此步骤,一方面,主机端需长期启动JAVA服务进程CHGPWSRV,JAVA程序会创建

SOCKET,并始终监听23400端口,当接受到请求时,JAVA中的线程WorkThread会调用C程序,

C程序中会调用IRRSEQ00接口向主机RACF发送指令,并将处理后的结果返回呈现给用户。

另一方面,开放端的PHP程序会根据URL中的MD5码在PWD_ACTION表中选择相应的“用户

名”和“系统名”,并通过Socket_create()创建SOCKET,23400端口,Socket_connect()与主

机服务端连接,Socket_write()向主机端发送特定格式字符串。主机端将接收的字符串解析成RACF

命令,从而完成“密码重置”或者“Resume”操作。这里我们还通过表PWD_ACTION中的Time

字段对超时操作进行了相应的处理,程序中设置的为30分钟,即生成的URL有效时间为30分钟。至此,

用户密码重置或者Resume操作已完成。

Page 21: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

20 百硕客户通讯 总第 34 期 2014 年 6 月

本文简单介绍了主机用户密码重置自动化工具,主要是为了日常工作中更方便地对主机ID进行管

理,使“用户密码重置”更加安全、有效、快捷。

Page 22: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

21 百硕客户通讯 总第 34 期 2014 年 6 月

The Storage sub-system frequently Ask

文 / 百硕外籍技术顾问 Fuddin

1. DFDSS VSAM dataset dump and restore

a. Why VSAM Alternate INDEXES and PATH not dump or restore?

i. Symptoms:

Dump or Restore job is successful no error messages but both

Alternate Indexes and PATH not dump or restore.

ii. Resolving the problem:

1. DFDSS dump or restore have one option to dump or restore

these both PATH. The option is SPHERE. Make sure before we

submit the dump or restore job must include this option.

2. When we restore a sphere to a preallocated target, all

components (base clusters, alternate indexes, and paths) of the

sphere must be preallocated. DFSMSdss does not restore a

sphere if only some parts of the sphere are preallocated.

3. Below is the sample job:

//DUMPDSN JOB ,CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID,REGION=0M

//*

//DUMP EXEC PGM=ADRDSSU

//SYSPRINT DD SYSOUT=*

//OUT DD DISP=(NEW,CATLG),UNIT=3390,SPACE=(CYL,(50,10),RLSE),

// DSN=xxxxxxx.SYS2.BACKUP

//SYSIN DD *

DUMP OUTDDNAME(OUT) -

DATASET(INCLUDE (-

**, -

) -

) -

COM TOL(ENQF) WAIT(0,0) ALLE SHARE ADMINISTRATOR SPHERE

专家问答 <<<

Page 23: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

22 百硕客户通讯 总第 34 期 2014 年 6 月

//RESTDSN JOB ,CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID,REGION=0M

//*

//DUMP EXEC PGM=ADRDSSU

//SYSPRINT DD SYSOUT=*

//IN1 DD DISP=(NEW,CATLG),UNIT=3390,SPACE=(CYL,(50,10),RLSE),

// DSN=xxxxxxx.SYS2.BACKUP

//SYSIN DD * RESTORE -

INDDNAME(IN1) -

DATASET(INCLUDE(**)) -

SPHERE -

REPLACE -

b. DFDSS Defrag

i. Symptom

Some time we see the volume have a lot of free space. But we can’t

allocate bigger dataset on this free volume because the largest free

space is not available.

How to reduce or recover the fragmentation volume (Frag Index in the

SMS volume)?

Below is the table from ISPF before DEFRAG:

------------------------------------------------------------------------------

VOLUME LIST

Command ===> Scroll ===> CSR

Entries 1-14 of 36

Enter Line Operators below: Data Columns 3-8 of 45

LINE VOLUME FREE % ALLOC FRAG LARGEST FREE

OPERATOR SERIAL SPACE FREE SPACE INDEX EXTENT EXTENTS

---(1)---- -(2)-- ---(3)--- (4)- ---(5)--- -(6)- ---(7)--- --(8)--

XXX303 4066029K 15 23126051K 316 418340K 105

XXX304 4083792K 15 23108288K 331 377668K 139

XXX305 4408891K 16 22783189K 328 429130K 113

XXX306 4270219K 16 22921861K 294 557786K 90

XXX307 4130994K 15 23061086K 335 279225K 113

XXX308 4032883K 15 23159197K 285 693083K 84

XXX309 3542109K 13 23649971K 263 1079051K 95

XXX310 4098235K 15 23093845K 296 693083K 117

XXX311 4121310K 15 23070770K 316 950395K 142

XXX312 4099065K 15 23093015K 330 762806K 141

Page 24: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

23 百硕客户通讯 总第 34 期 2014 年 6 月

ii. When should we run the Defrag?

We do the volume monitoring at least once a day. Please observe

the Defrag Index value. We must ensure the value must below than 300.

If more than 300 we should start to run the Defrag job.

iii. Resolving the problem

1. We can use DFDSS Defragutilities to reduce fragmentation or

re-claim the small free space. The best time to run this job is

during less accessing volume either by batch, online or TSO. This

will get maximum defragmentation. This job is no limitation and

also can run concurrent with other series of volume. Below is the

sample job:

//BAYSH03T JOB (0000),'MSAM',CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),

// TIME=1440,REGION=0M,NOTIFY=&SYSUID

//STEP01 EXEC PGM=ADRDSSU,PARM='RACFLOG=YES,TRACE=YES'

//SYSPRINT DD SYSOUT=*

//SYSIN DD *

DEFRAG DYNAM(XXX303)

DEFRAG DYNAM(XXX304)

DEFRAG DYNAM(XXX305)

DEFRAG DYNAM(XXX306)

DEFRAG DYNAM(XXX307)

DEFRAG DYNAM(XXX308)

DEFRAG DYNAM(XXX309)

DEFRAG DYNAM(XXX310)

DEFRAG DYNAM(XXX311)

DEFRAG DYNAM(XXX312)

2. Table below is after first Defrag. We can see from the frag index

column for volume AD9303 from 316 reduce to 247 and follow the

others also reduce of Defrag Index.

------------------------------------------------------------------------------

VOLUME LIST

Command ===> Scroll ===> CSR

Entries 1-14 of 36

Enter Line Operators below: Data Columns 3-8 of 45

LINE VOLUME FREE % ALLOC FRAG LARGEST FREE

OPERATOR SERIAL SPACE FREE SPACE INDEX EXTENT EXTENTS

---(1)---- -(2)-- ---(3)--- (4)- ---(5)--- -(6)- ---(7)--- --(8)--

XXX303 4066029K 15 23126051K 247 418340K 105

Page 25: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

24 百硕客户通讯 总第 34 期 2014 年 6 月

XXX304 4083792K 15 23108288K 331 377668K 139

XXX305 4408891K 16 22783189K 328 429130K 113

XXX306 4270219K 16 22921861K 294 557786K 90

XXX307 4130994K 15 23061086K 335 279225K 113

XXX308 4032883K 15 23159197K 285 693083K 84

XXX309 3542109K 13 23649971K 263 1079051K 95

XXX310 4098235K 15 23093845K 296 693083K 117

XXX311 4121310K 15 23070770K 316 950395K 142

XXX312 4099065K 15 23093015K 330 762806K 141

3. Table below is after fourth Defrag. We can see from the frag

index column for volume AD9303 from 247 to 242 and free

extents also reduce from 105 to 24.

------------------------------------------------------------------------------

VOLUME LIST

Command ===> Scroll ===> CSR

Entries 1-14 of 36

Enter Line Operators below: Data Columns 3-8 of 45

LINE VOLUME FREE % ALLOC FRAG LARGEST FREE

OPERATOR SERIAL SPACE FREE SPACE INDEX EXTENT EXTENTS

---(1)---- -(2)-- ---(3)--- (4)- ---(5)--- -(6)- ---(7)--- --(8)--

XXX303 4066029K 15 23126051K 242 809288K 24

XXX304 4083792K 15 23108288K 238 840000K 24

XXX305 4408891K 16 22783189K 261 586838K 28

XXX306 4270219K 16 22921861K 226 822347K 19

XXX307 4130994K 15 23061086K 209 731984K 20

XXX308 4032883K 15 23159197K 234 902252K 25

XXX309 3542109K 13 23649971K 141 1582054K 12

XXX310 4098235K 15 23093845K 235 920513K 26

XXX311 4121310K 15 23070770K 207 1623556K 26

XXX312 4099065K 15 23093015K 184 1137043K 10

4. Below is the VTOC display before Defrag:

VTOC Summary Information Volume . : XXX312 Command : _____________________________________________ Unit . : 3390 Volume Data VTOC Data Freespace Tracks Cyls Tracks :491,400 Tracks :224 Size 73727 4911 % Used : 84 % Used : 14 Largest 12015 801 Tracks/Cyls: 15 Free DSCBS : 9733 Free

Page 26: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

25 百硕客户通讯 总第 34 期 2014 年 6 月

Extents 97

5. Below is the VTOC display after first Defrag:

VTOC Summary Information Volume . : XXX312 Command : _________________________________________________ Unit . : 3390

Volume Data VTOC Data Freespace Tracks Cyls Tracks : 491,400 Tracks : 224 Size 73727 4911 % Used : 84 % Used : 14 Largest 14190946 Tracks/Cyls: 15 Free DSCBS : 9733 Free

Extents 16

6. Below is the VTOC display after fourth Defrag but no change from

the first Defrag. This possible reason many dataset are in use.

Defrag job can’t do the defragmentation better.

VTOC Summary Information Volume . : XXX312 Command : _________________________________________________ Unit . : 3390

Volume Data VTOC Data Freespace Tracks Cyls Tracks : 491,400 Tracks : 224 Size 73727 4911 % Used : 84 % Used : 14 Largest 14190946 Tracks/Cyls: 15 Free DSCBS : 9733 Free

Extents 16

2. DFHSMSHSM question

i. Symptom:

1. Backup or Migration RC 99

2. Error Message ARC0743I Return Code 99 and Reason Code 4

ARC0734I

ARC0734I ACTION=action FRVOL=volser1 TOVOL=volser2 |

Page 27: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

26 百硕客户通讯 总第 34 期 2014 年 6 月

TRACKS=tracks |

RC=retcode, REASON=reascode, AGE=days, DSN=dsname

ii. Resolving the problem

1. The meanings of variables when action is BACK-UP are:

retcode If the last two digits of retcode are nonzero, see message

ARC13nnI where nn is the last two digits of retcode.

Return Code 99

Reason Code 4

Please refer to error message ARC1399I

ARC1399I UNSUPPORTED DATA SET FOR BACKUP

Explanation: A backup command was issued for a data set that

DFSMShsm did not back up. There are some data set types not be

backed up by the DFSMShsm, either automatically or by command. The

data set name is contained in the preceding ARC1001I or associated

ARC0734I message. In the ARC1001I or ARC0734I message,

return-code has a value of 99 (corresponding to the ARC1399I

message). The reason-code in the ARC1001I or ARC0734I message

lists the reason DFSMShsm could not back up the data set.

The values for reason-code are:

Reascode Meaning

Unsupported data set organization.

Example:

ARC0734I ACTION=BACK-UP FRVOL=T1TS03 TOVOL= *** TRACKS= *** RC= 99, REASON=

4, AGE= 3, DSN=DIDP035.DIDP035.ONL.SRCLIB

ARC0734I ACTION=SPCMGMT FRVOL=D1IB07 TOVOL= *** TRACKS= 0 RC= 99, REASON=

4, AGE= 7, DSN=IBSDEV.AITDMTT.EB.G0025V00

Command - Enter "/" to select action DsorgRecfmLreclBlksz

DIDP035.DIDP035.ONL.SRCLIB ? 0 0

IBSDEV.AITDMTT.EB.G0025V00 ? 0 0

System or Application Programmer Response: Advice the user to

define with correct Dataset Organization (DSORG) either PS,PO or VS.

3. ICKDSF question

Page 28: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

27 百硕客户通讯 总第 34 期 2014 年 6 月

a. VTOC Full

i. Symptom:

How to make the VTOC bigger without offline the volume?

ii. Resolving the problem

We can expand a VTOC in current or new location using the

EXTVTOC or NEWVTOC (volume must be offline) parameter

of ICKDSF REFORMAT where we can specify the total size

in tracks of the new VTOC after expansion (check APAR

PN69797 is applied). Below is the sample job:

//EXPAND EXEC PGM=ICKDSF

//VOLDD DD DISP=SHR,UNIT=3380,VOL=SER=T1HS05

//SYSPRINT DD SYSOUT=A

//SYSIN DD *

REFORMAT DDNAME(VOLDD) VERIFY(T1HS05) EXTVTOC(300)

b. How to initialize on the bigger emulation volume example model 54 and where

to define the VTOC and INDEX.

i. Symptom

How to initialize big volume and min VTOC?

ii. Resolving the problem

1. We define VTOCon cylinder 1, head 0 and total VTOC space is

315 tracks.

2. We define INDEX on cylinder 0, head 1 and total INDEX space is

14 tracks.

3. With this definition we don’t worry to have VTOC or INDEX full on

the big volume. This VTOC size usage 12 % on the 64 % total

DASD usage. Total VSAM dataset is 1806 data and index file.

4. Below is the sample job to initialize the model 54

INIT UNIT(NNNN) VFY(NNNNNN) VOLID(NNNNNN) PURGE VTOC(1,0,315) INDEX(0,1,14)

Page 29: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

28 百硕客户通讯 总第 34 期 2014 年 6 月

AMODE 和 RMODE 文 / 郭金磊

文旨在讲解AMODE/RMODE、和与此相关的概念,以及发生错误时该如何解决。

(说明:鉴于目前绝大部分主机应用程序都采用的是24位或者31位寻址,本篇幅暂不对

64位寻址做阐述。)

24 位寻址到 31 位寻址

早在 1960 年代,绝大部分计算机内存只有 512K,最大也不过 2M。那时 IBM 主机采用的是 24

位寻址,最大可以支持 2^24=16M 的寻址空间,这在当时已经被认为是个天文数字。然而随着时间的

推移,计算机科技的发展,16M 寻址空间被发现远远不能满足实际需要,于是 IBM 主机开始采用 31

位寻址,把寻址空间扩展到了 2G(2^31=2G)。由于这两种不同的寻址方式,现在的 2G 虚存空间中

就有了“16M 以下”和“16M 以上”区分。他们的分界线就是 16M(地址应该是 X'00FFFFFF'),

比 这 个 地 址 小 的 ( X'00000000'--X'00FFFFFF ) 被 称 之 为 “ 线 下 ” , 比 这 个 地 址 大 的

(X'01000000'--X'7FFFFFFF')被称之为“线上”,即我们常说的“below the line”和“above

the line”。

寻址空间的提升,虽然带来了好处,但也出现了程序兼容性问题。比如,原来的很多应用程序

(带有 control block 或者 buffer 的:DCBGET/DCBPUT/DCBREAD/DCBWRITE/…),在开发

的时候是 24 位寻址方式,当时并没有考虑将来的地址扩展及兼容性,都被写成了类似下面这样的结

构(以 OPEN 宏为例):

OPEN (FILEIN,(INPUT))

+ CNOP 0,4

+ BAL 1,*+8

+ DC AL1(128)

+ DC AL3(FILEDCB)

+ SVC 19

AL3(FILEDCB)中的 FILEDCB 代表 FILEDCB 的虚存地址,它被放置在一个长度为 3 字节的内

存变量里,这在当时还是 24 位寻址的时候是没有问题的。而一旦采用 31 位寻址,虚存扩展到 2G,

也就是说 FILEDCB 的虚存地址实际要用 31 bits 来表示,如果这时候 OPEN 宏还这样写,就可能出

现问题,因为计算机会读取到一个错误的 FILEDCB 虚存地址(其最左边的高 7 位被忽略了),除非

FILEDCB 的虚存地址还是在 16M 线以下。

>>> 来稿选登

Page 30: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

29 百硕客户通讯 总第 34 期 2014 年 6 月

在 24 位寻址的时代,类似上述的写法,是被看成非常好的习惯。因为这样不但能满足访问 16M

内存地址的需要,而且还节省了一个字节的内存空间。事实上,在很多宏的定义中,节省的这一个字

节里存放着非常重要的信息,比如本例中,这个字节里就被放置了数值常量 128 以作为输入参数来调

用 I/O 例程。因此,以此种方式编写的程序是非常大量的,想把所有程序的 24 位寻址都改成 31 位,

彻底摆脱 16M 内存束缚的限制,工程将巨大。

鉴于以上原因,IBM 提出了 AMODE(Addressing Mode)和 RMODE(Residency Mode)的概

念,通过 AMODE 和 RMODE 的组合来兼容原有的老程序:

AMODE:

24: indicates that 24-bit addressing must be in effect.

31: Indicates that 31-bit addressing must be in effect.

ANY: Indicates that either 24-bit or 31-bit addressing can be in effect.

通过在编译链接的时候设置 AMODE 来告诉操作系统,当程序运行时,是按 24 位还是按 31 位

寻址。

RMODE:

24: Indicates that the module must reside below the 16-MB virtual storage line (within 24-bit

addressable virtual storage).

ANY: Indicates that the module might reside anywhere in virtual storage either above or

below the 16-MB virtual storage line. MVS places the program above 16 megabytes

unless there is no suitable virtual storage above 16 megabytes.

通过在编译链接的时候设置 RMODE 来告诉操作系统把本程序装载到 16M 这条线以下还是以上。

其中 RMODE:ANY 表示,系统优先考虑放在 16M 线以上,除非 16M 线以上没有合适的空间了,它

才考虑 16M 线以下。所以,如果你的程序必须要放置在 16M 线以下,那只有一种选择,把 RMODE

设置成 24。

AMODE 和 RMODE 的组合

IBM 提供的组合:

RMODE 24 RMODE ANY

AMODE 24 合法 非法

AMODE 31 合法 合法

AMODE any 合法 看情况

Page 31: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

30 百硕客户通讯 总第 34 期 2014 年 6 月

关于组合的介绍,具体请查看“z/OS V1R12.0 MVS Programming Assembler Services Guide”中的

AMODE and RMODE combinations at execution time 章节。其中 AMODE 24/RMODE 24 是默认选项。

例如,上面提到的带有 OPEN 宏的程序,假设程序中只有使用 3 个字节作为常量地址的问题,则

在编译连接的时候,可以采用【RMODE(24),AMODE(24/31/ANY)】,兼容此种程序。因为

在这些组合下,当程序运行时是被放在 16M 线以下,其中的常量内容地址就能通过 3 个字节访问了。

如果程序在编译链接的时候,设置成 RMODE:ANY,AMODE(31),根据前面的解释,程序运行时

操作系统就会被放置在 16M 线以上,此时程序中表示常量内容地址已经需要使用 31 位来表示了,而

OPEN 宏仍然使用 3 个字节来访问,因此,运行此程序就会报 S0C4 错误,错误信息如下:

SYSTEM COMPLETION CODE=0C4 REASON CODE=00000011

表示错误的访问了内存空间。

而这个错误,早在 LINK 的时候系统就已经提示,打开 Link 的 SYSPRINT 数据集,其提示:

IEW2635I 4B34 THREE BYTE ADCON IN SECTION MAIN AT OFFSET 00000015 IN

CLASS B_TEXT WITH RMODE=ANY CANNOT BE RELOCATED.

这条信息的意思是:程序中有个三个字节的 A 型地址常量,只能 locate 到线下,不能设置

RMODE:ANY.应该改成 RMODE:24(尽管 LINK 这一步返回码是 0。不过这也提醒了我们,返

回码位 0 绝不意味着本步就不出错)。

一般情况下,可以设置 RMODE(ANY),AMODE(31),来充分利用 2G 的虚存空间。但很

多时候我们的应用程序在编译链接的过程中,并没有指定 AMODE 和 RMODE,系统默认设置

AMODE(24),RMODE(24),这样的设置就是回到了最早的 24 位寻址原态,基本上运行是没

有问题的。一旦你的程序规模超过 16M 或者程序运行时访问的内存超过 16M 的,那就不能使用默认

设置了。

RMODE(ANY)

为什么线上线下都可以装载的应用程序,操作系统会优先选择线上呢?

一、线上空间更大。

二、线下空间很宝贵。因为线下空间原本不大,且还被操作系统和很多常用例程占据。

其实一个放在 16M 线下线上都可以的应用程序,被放置在哪里根本毫无区别,操作系统之所以优

先考虑线上的唯一原因就是,可以腾出更多的线下空间供系统和程序运行时使用。

总结

综上所述,在编写程序时,我们只要正常的使用 4 个字节表示地址,那么就没有兼容性问题。并

通过 RMODE(ANY),AMODE(31)编译连接程序,充分利用 31 位寻址,2G 虚存带来的大空

间的好处。如果程序有兼容性问题,只是常量地址引起的,可以使用 RMODE(24),AMODE

Page 32: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

31 百硕客户通讯 总第 34 期 2014 年 6 月

(24/31/ANY)来解决;如果是动态内存地址引起的,那就只能使用 RMODE(24),AMODE(24)

来解决。

Page 33: 百 客户通讯 - bayss.comfor z/VM. OpenStack is an infrastructure as a service (IaaS) cloud computing open source project. IBM joined the project in 2012 and in support of System

百硕客户通讯总第34期(2014年6月)

百硕同兴科技(北京)有限公司BAYSHORE CONSULTING AND SERVICES CO.,LTD.

地址: 北京市朝阳区望京科技园利泽中二路1号中辰大厦209室(100102)

电话: (010)64391733http://www.bayss.comEmail: [email protected]