大型机汇编(mainframe assembler/HLASM)之STCK/STCKE

来源:互联网 发布:bootcamp支持软件位置 编辑:程序博客网 时间:2024/05/02 13:00

插个题外话,为什么有些程序要用汇编写,一般来说,主要有:

1)在运算速度上有要求。比如银行,保险类的打印某些报表,这些报表在夜间batch运行阶段,可能会被数亿次地调用。

2)某些程序过于依赖于底层。比如有些从文件中读取的数据,需要在内存里开辟空间(或许建立一个table,或许建立一个chain...)来维护它,在整个系统运行阶段,就要有程序对这块内存进行维护。而对此块内存的操作用汇编写就比较好(COBOL/PLI的优势在于处理数据,对于底层并不是它们所擅长的)。

3)某些靠某一个变量来展开的程序,比如就根据Request_ID来响应不同的分支。

4)某些涉及Sysplex/LPAR/CPC(CentralProcessingComplex)的程序。下面介绍两个和此很有关联的两个指令:

STCK --Store Clock。 本指令应用格式如下:

STCK VQ_INSERT_STCK
而VQ_INSERT_STCK定义为:
VQ_INSERT_STCK DC XL08'00'

它的作用就是把TOD(time of day)的前64个字节放在一个doubleword类型的变量里(一般它是被用在CPC里,因为它的取值在CPC里具有唯一性,可以利用它来生产唯一的number)

还有一个类似的指令:

STCKE--STCK Extended。应用格式和STCK类似,并且它的取值在Sysplex里具有的唯一性。如需详细了解,请参阅IBM红皮书Principles of Operation。

这里推荐两个链接:http://www.longpelaexpertise.com.au/toolsTOD.php

http://www.ruifeio.com/2009/07/03/how-to-check-if-an-lpar-is-part-of-a-sysplex/

 

摘抄:

CPC(CentralProcessingComplex) An IBM mainframe that has two or more central processors (CPs) sharing the same memory. It is the collection of processors, memory and I/O subsystems manufactured with a single serial number, typically all contained in one cabinet.
  • A central processor complex (CPC) is a physical collection of hardware that consists of main storage, one or more central processors, timers, and channels.
  • A logical partition (LPAR) is a subset of a single physical system that contains resources (processors, memory, and input/output devices), and which operates as an independent system.
  •  

    有疑问请联系QQ349106216
    
    原创粉丝点击