Translator ADATA to XML

Czech Technical University in Prague Faculty of Electrical Engineering Department of Computer Science and Engineering Bachelor’s Project Translator ...
Author: Clyde Doyle
4 downloads 1 Views 298KB Size
Czech Technical University in Prague Faculty of Electrical Engineering Department of Computer Science and Engineering

Bachelor’s Project

Translator ADATA to XML

Robert Fujdiar

Supervisor: Ing. Radek Mařík, CSc.

Study Programme: Software Engineering and Management, Bachelor programme Field of Study: Software Engineering May 20, 2010

České vysoké učení technické v Praze Fakulta elektrotechnická Katedra počítačů

Bakalářská práce

Překladač ADATA do XML

Robert Fujdiar

Vedoucí práce: Ing. Radek Mařík, CSc.

Studijní program: Softwarové technologie a management, Bakalářský Obor: Softwarové inženýrství 20. května 2010

Acknowledgements I would like to give my thanks to CA CZ ltd. and their employees for providing the background needed for successful completion of my thesis. My thanks belongs especially to Ing. Radek Mařík, CSc. for supervising this thesis and to CA CZ ltd. managers for their long term support during my studies.

Poděkování Rád bych poděkoval firmě CA CZ s.r.o. a jejím zaměstnancům za poskytnutí zázemí nutného k dokončení této práce. Zejména pak panu Ing.Radku Maříkovi, CSc. za vedení a samotný nápad realizace této bakalářské práce a také manažerům firmy CA CZ s.r.o. za dlouhodobou podporu při mých studiích.

Declaration I hereby declare that I have completed this thesis independently and that I have listed all the literature and publications used. I have no objection to usage of this work in compliance with the act § 60 Zákon č. 121/2000 Sb. (copyright law), and with the rights connected with the copyright act including the changes in the act.

Prague, 20 May 2010 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Prohlášení Prohlašuji, že jsem práci vypracoval samostatně a použil jsem pouze podklady uvedené v přiloženém seznamu. Nemám závažný důvod proti užití tohoto školního díla ve smyslu § 60 Zákona č. 121/2000 Sb., o právu autorském, o právech souvisejících s právem autorským a o změně některých zákonů v platném znění (autorský zákon). V Praze dne 20. května 2010 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Abstract Bachelor’s thesis “Translator ADATA to XML” is created as a part of a project focused on Assembler programming language programs visualization, debugging and comprehension. Presentation of developing and debugging assembler programs under z/OS operating system on mainframe computers and also introduction of a program written in C++ language used as an interface between the source code in assembler programming language and its further processing is a subject of this thesis. Program included in this thesis reads binary file, produced by assembler compiler, called ADATA and transforms it into XML format output suitable for further processing. Neither this bachelor’s thesis nor the program included are trying to interpret or explain the meaning of information included in ADATA file, however on different examples it shows the meaning of the translation itself for better understanding of this work.

Abstrakt Bakalářská práce „Překladač ADATA do XML“ je vytvořena jako součást většího projektu zaměřeného na vizualizaci, ladění a porozumění programům napsaných v jazyku Assembler pro sálové počítače známé jako IBM Mainframe. Obsahem této práce je jak přiblížení problematiky vývoje programů ve zmíněném programovacím jazyce v prostředí z/OS, tak představení programu, který má dále posloužit jako rozhraní mezi samotným zdrojovým kódem a jeho dalším zpracováním. Přiložený program zpracovává binární soubor zvaný ADATA, který je vytvořen při kompilaci zdrojového kódu v jazyce Assembler, a převádí jej do formátu XML, který je mnohem vhodnější pro další zpracování. Tato práce, ani přiložený program se nesnaží interpretovat informace obsažené v ADATA souboru, avšak na několika příkladech vysvětluje jeho obsah pro lepší pochopení smyslu této práce.

Table of contents: 1. Introduction................................................................................................................... 1 1.1 Thesis goals and motivation ................................................................................... 1 2. System overview........................................................................................................... 3 2.1 Mainframe............................................................................................................... 3 2.2.1 History and present of Mainframe computers ................................................. 3 2.2 JCL.......................................................................................................................... 4 2.3 Programming on Mainframe systems and assembler language.............................. 6 2.3.1 Compiling the assembler program ................................................................... 7 3. ADATA ........................................................................................................................ 9 3.1 ADATA file structure ............................................................................................. 9 3.1.1 Record layouts ................................................................................................. 9 3.1.3 Common header section................................................................................... 9 3.1.4 Record Types ................................................................................................. 10 3.2 Some ADATA records in detail............................................................................ 11 3.2.1 Job Identification – X’0000’.......................................................................... 11 3.2.2 External symbol dictionary record – X‘0020‘ ............................................... 12 3.3 How to get the ADATA file ................................................................................. 13 4 Program description ..................................................................................................... 14 4.1 Class structure....................................................................................................... 14 4.2 ADATA transformation to XML.......................................................................... 17 4.3 Invoking the Translator ADATA to XML............................................................ 19 5 Experiments ................................................................................................................. 21 5.1 Data size................................................................................................................ 22 5.1.1 Small program example ................................................................................. 22 5.1.2 Bigger assembler source code........................................................................ 23 5.2 Working with XML .............................................................................................. 23 6 Conclusion ................................................................................................................... 24 Bibliography ................................................................................................................... 25 List of Attachments:........................................................................................................ 27

List of figures Picture 1: ADATA record processing............................................................................. 14 Picture 2: Class organisation schema.............................................................................. 16 Picture 3: Data-flow diagram.......................................................................................... 21

List of tables Table 1: JCL example with explanation ........................................................................... 6 Table 2: ADATA record layouts ...................................................................................... 9 Table 3: Common header section ................................................................................... 10 Table 4: Job Identification record ................................................................................... 12 Table 5: External symbol record..................................................................................... 12 Table 6: Record names transformation ........................................................................... 17 Table 7: Grouping of entries ........................................................................................... 17 Table 8: "File" group of entries in JobID entry .............................................................. 18 Table 9: "File" group of entries in OutputFile entry....................................................... 18 Table 10: Type Flag definition in programmer guide..................................................... 19 Table 11: Type Flag translation ...................................................................................... 19 Table 12: Program I/O description ................................................................................. 19 Table 13: Data amount statistics of a small program...................................................... 22 Table 14: Data amount statistics of a bigger program .................................................... 23 Table 15: XPath queries.................................................................................................. 23

List of code examples Code example 1: JCL compiling Assembler language program ...................................... 8 Code example 2: JCL generating ADATA file .............................................................. 13 Code example 3: The main loop of the program ............................................................ 16 Code example 4: Running Translation ........................................................................... 20 Code example 5: Simple assembler language program .................................................. 22

1. Introduction Programming languages have developed during the long period of computer programming from low level languages like assemblers, to high level languages like Java, C#, PHP etc. Nowadays most of the programmers prefer to write their code in programming languages considered as high ones. Only few programmers are willing and able to learn and really work in the old way of programming. We can argue about a lot of reasons of this trend, but as a mainframe assembler programmer, I can think of one.

1.1 Thesis goals and motivation IDE (Integrated Development Environment) is considered as a standard for developers work in higher programming languages. Java has NetBeans or Eclipse, C/C++ has many of IDEs, MS Visual Studio is most commonly known. Such an environment provides not only a user friendly programming tool, but also an integrated debugger. Any absence of such environment is a big disadvantage when student picks a language which he or she will make his or her program in. Assembler is one of the languages where the number of IDE is low (even if the present ones can be called IDEs). Mainframe is a special case of developing and debugging. The developer is working through the terminal in a mainframe computer. There is no graphic, limited mouse interaction, no “on click help”, and no IDE at all. There are some debugging tools for the assembler language in mainframe but the demands on training for such tools are high. Many mainframe assembler programmers use only a listing to debug their program. They look at the listing and try to get as much information as possible. It is not fast, but a reliable way to see what the program performs. Of course they will neither see the run of the program, nor they will know the actual content of variables, but they can think of it all from translated instructions and the addresses associated with them. Still, there is not enough information in the listing itself. That’s why the assembler provides other output which is not as well known as a listing. It is called ADATA. This ADATA output contains also information about

-1-

program being assembled. It is much larger and more extensive than listing. Despite that, it is not used so frequently as the listing. Because it is binary.

This bachelor’s thesis intends to provide a strong and reliable tool for assembler developers. The program introduced in this thesis translates binary ADATA structure into XML formed output. XML technology will provide the platform for other manipulations with ADATA whether it’s searching, listing, logging etc. This thesis does not intend to explain or interpret the meaning of ADATA records, but translates the binary input to a XML file for further manipulations. Anyway, some of the records are described within this thesis to illustrate meaning of the program itself.

-2-

2. System overview Translator ADATA to XML is a part of a bigger corporate project called AVA: “Assembly visualization and analysis” supported by CA CZ ltd. which develops and maintains mainframe programs in the Prague Technological Centre from 2005, and as such it has boundaries and predefined parameters for functionality and output structure. This chapter will explain the background of this project and introduce a mainframe way of programming.

2.1 Mainframe There is no doubt that present time belongs to personal computers known as PCs. There is one PC in almost each family and companies are using PCs for their work. But PC is not powerful tool for huge data transactions, database maintaining and so on. International companies are using mainframe computers for such a work. Mainframe is a powerful computer used by large organizations for critical applications, typically bulk data processing, industry and customer statistics or financial transaction processing. Mainframe computer In Wikipedia : the free encyclopedia [online]. St. Petersburg (Florida) : Wikipedia Foundation, 16 October 2001, 3 May 2010 [quot. 2010-05-11]. Available on WWW: .

2.2.1 History and present of Mainframe computers First computers came in to the world during the time of World War II. Mainframe known as Automatic Sequence Controlled Calculator (ASCC) was created by IBM in 19441. Many types of mainframe computers were created from that time. They were bought by large companies and national institutions. IBM System/360 is the most commonly known mainframe machine. Huge databases, scientific and business calculations were performed on those machines. It was crucial that those calculations will work not only through one year or one decade, mainframe were designed to endure.

1

IBM Archives [online]. 2003-01-23 [quot. 2010-05-10]. Available on WWW: .

-3-

Mainframe is accounted as a legacy system. An old computer system that continues to be used, because it still functions for the users' needs, even though newer technology or more efficient methods of performing some tasks are now available2. Many of the companies which bought their mainframe during 1990s or even 1980s are still using the hardware and the software written during that time is still running on those machines and even on the new ones. In short – corporate world is running on the mainframes. A360, zSeries and so, are used all over the world. z/OS is the newest operating system running on mainframe machines. Programs and calculations can run within the Paralel Sysplex even when one of operating system is having a trouble. Punch cards or paper tapes were used in history. Input was done only by accessing a main computer reader and providing a set of punch cards. Terminals were introduced in early 70s and nowadays only terminal emulation software is used to access the mainframe. Programmers working with such a terminal emulator are limited to text interaction. This is the main difference between the mainframe and the PC from the programmer point of view.

2.2 JCL Mainframe computers are unique not only in a field of hardware but also in a way programs are executed. Job control language (JCL) is used to run programs in the mainframe machines. It is a scripting language used to instruct the system on how to run a batch job or start a subsystem. In JCL for z/OS the unit of work is job. A job consists of one or several steps, each of which is a request to run one specific program. JCL also specifies the way data are processed to the program and out of it. Syntax of a JCL language instructs all lines which the operating system processes have to begin with two slashes "//" - always starting in the first column. However, there are two exceptions: the delimiter statement and the comment statement. A delimiter statements begins with a slash and an asterisk (/*), and a comment statement begins with a pair of slashes and asterisk (//*).

2

Legacy system In Wikipedia : the free encyclopedia [online]. St. Petersburg (Florida) : Wikipedia Foundation, 25 February, 2002, 9 February, 2010 [quot. 2010-05-08]. Available on WWW: .

-4-

There are three basic JCL statements: JOB:

Identifies the job. Provides a jobname to a system and optionally can carry few job-wide parameters. A job card usually provides information to enable the computer services department to bill the appropriate user department. And it also defines how the job will be run, e.g. its priority relative to other jobs in the queue.

EXEC: Identifies the step. It provides the name of a program to execute. There can be multiple EXEC statements within one job. DD:

The Data Definition provides inputs and outputs to the execution program on the EXEC statement. This statement links a dataset or other I/O device to a ddname3 coded in a program. DD statements are associated with a particular step and they do not apply for the whole job (however there can be exceptions).

Example of simple JCL follows: JCL statement //CPY JOB (n),'prg',CLASS=L,MSGCLASS=X

//COPY01 EXEC PGM=IEBGENER

//SYSPRINT DD SYSOUT=*

//SYSUT1 DD DSN=OLDFILE,DISP=SHR

explanation A JOB card. CPY is the name of the JOB n is an account number prg is the name of the programmer CLASS place a job into L class for execution priority MSGCLASS describes the way how to handle messages EXEC statement describing the step. IEBGENER is name of the program to be executed DD statement SYSPRINT is a ddname requested by a program. SYSOUT=* means the output goes to standard JCL output. DD statement describing the old dataset

3

A ddname is the name of a data definition (DD) statement that corresponds to a data control block that contains the same name. The DD statement is a job control statement describing a data set associated with a specific job step. IBM System z Aplication Development help system [online]. IBM.com 2004 [quot. 2010-05-11].. Available on WWW: .

-5-

//SYSUT2 DD DSN=NEWFILE, // DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(40,5),RLSE), // DCB=(LRECL=115,BLKSIZE=1150) //SYSIN DD DUMMY

DD statement describing new dataset NEWFILE parameters

DUMMY means that no SYSIN I/O will be created.

Table 1: JCL example with explanation

For full understanding of JCL structure please see IBM: z/OS operating system4.

2.3 Programming on Mainframe systems and assembler language Work of programmer is different on mainframe systems. Programmers are often used to high level languages like C++, C#, Java, and IDEs coming with them. Many of students are educated without knowledge of any low level programming language and they think that Pascal is the oldest one they can ever see. It is hard to find someone who not only knows the assembler language, but also who is willing to make bigger projects in this language. Assembler is the symbolic programming language that is closest to the machine language in form and content. It is useful if closer control of the program down to the byte or bit level is needed. It is not commonly used for large projects in the world of PCs for its intricacy and costingness on programmers work but mainframe programs, sometimes 30 years old, are still maintained in Assembler. This language was used in past because its logic connected to the hardware. Nowadays many companies abandon the Assembler programming language but not in field of mainframe. Mainframe is often considered as a legacy system. However as was said before, programs, routines and application written in a past are still running on this platform. The assembler language is made up of statements that represent either instructions or comments. The instruction statements are the working part of the language and are divided into the following three groups:

Machine instruction

4

is a symbolic representation of a machine language.

IBM: z/OS operating system [online]. Available on www:

-6-

Assembler instruction

is a request to the assembler compiler and linker to do certain operations during the assembly of a source module. For example defining constants or the end of a source module.

Macro instruction

is a request to the assembler program to process a predefined sequence of instructions called a macro definition.

HAL(High-level Assembly language) or HLASM (High-Level Assembler) was created to simplify creation of assembler programs. It implements programming concepts defined by Bohm and Jacopini for the IBM 360/370 Assembly language programmer through assembler macros5. It provides the ability of using IF-THENELSE-ENDIF concept well known from other programming languages. SELECTWHEN-ENDSEL, LOOP-WHILE-ENDLOOP and other statements are supported as well as OR-AND-NOT conditions. Those statements are basically macros expanded into a few assembler instructions. Programmer should be careful while using these statements because it usually uses some of the registers and rewrites their value.

2.3.1 Compiling the assembler program ASMAC is on of the procedures used to compile programs written assembler language. HLASMC must be called if a program includes HAL macros. The JCL for running the simple assembly includes:

A job description Identifies the beginning of your job to the operating system A statement to run the assembler Calls the cataloged procedure ASMAC, parameters for the assembler can be provided.

5

High-level Assembly Language : High-level Assembly Programming Philosofy and HAL Reference. 40pages.

-7-

Definition for the input Specifies that the assembler language source program follows immediately after this statement.

Exact JCL will look like the following example. //jobname JOB account_number,prg_name,MSGLEVEL=1 //stepname EXEC HLASMAC,PARM=NOOBJECT //SYSIN DD * ... Assembler source statements

... /* Code example 1: JCL compiling Assembler language program

-8-

3. ADATA 3.1 ADATA file structure The ADATA is a binary file composed from records. Basically, ADATA is a stream of records. Each type of record provides information about the assembler language program being assembled. Each record consists of two parts: •

A 12-byte header section, which has the same structure for all record types.



A variable-length data section, which varies by record type.

3.1.1 Record layouts A notation based on the assembler language data type is used in fields described in each of the record types.

C indicates EBCDIC data H indicates 2-byte binary integer data F indicates 4-byte binary integer data A indicates 4-byte binary address data X indicates hexadecimal (bit) data Table 2: ADATA record layouts

3.1.3 Common header section Each ADATA record contains a 12-byte common header section. All ADATA records at the same architecture level have the same header section which describes: the producing language, the record type, the record architecture level (or version), a continued-record indicator etc. Only two fields in common header section are important for the purposes of this thesis. They are the ‘Record Type’ and ‘Associated Data field length’.

Field Language code Record Type

Size FL1 XL2

Description 16 – Assembler The record type, which can be one of the following: X'0000' - Job Identification record

-9-

... ... Associated Data Field length HL2 Table 3: Common header section

X'0001' - ADATA Identification record ... X'0080' - USING Map record X'0090' - Assembly Statistics record other fields not used for the purpose of this thesis The length, in bytes, of the data following the header

For the full description of the common header section please see IBM HLASM Programmers guide Appendix D6 or attachment [B] of this thesis.

3.1.4 Record Types There are specific entries following after the common header section depending on the type of the record. Here is a list of some important record types you can find in the ADATA file. This list is a quotation from a work, and for the full list and a description of ADATA record types please see IBM HLASM Programmers guide Appendix D referred before or attachment [B] of this thesis.

ADATA record types: Job Identification X'0000' Provides information about the assembly job, the host system environment, and the names of the primary input data sets. ADATA Identification X'0001' Provides a precise time stamp, and a description of the character set used for character data in the file. ADATA Compilation Unit Start/End X'0002' Indicates where the associated data records for each assembly unit begin and end. The START record is written to the associated data file at the beginning of each assembly. The END record is written to the associated data file at the end of each assembly. The END record contains a count of the total number of records written to the associated data file. When there are multiple assembler 6

HLASM Programmers guide Appendix D [online]. Available on www:

- 10 -

programs in the input file, there is a START and END record for each program assembled. Machine Instruction X'0036' Describes the object code generated for a source program statement. If a source program statement causes machine instructions to be generated, then a Machine Instruction record is written following the source record. If there is an error in the machine instruction, the Machine Instruction record follows the Source Error record. Symbol X'0042' Describes a single symbol defined in the program. There is one Symbol record for each symbol defined in the program, including literals. Symbol and Literal Cross Reference X'0044' Describes the references to a single symbol. All Symbol and Literal Cross Reference records follow the Symbol record to which they apply.

3.2 Some ADATA records in detail Because the purpose of this thesis is not to provide detail information about the ADATA file, but to describe the transformation to an XML output, we will look closer only on few of the most interesting ADATA records.

3.2.1 Job Identification – X’0000’ The Job Identification record provides information about the job by which we are assembling the assembler language program. It consists of information like date and time of the assembly, a version and other details about the assembler used in this job, also information about the JCL and, of course, about input files is included. A simplified description of a Job Identification record is shown in the following table. For the full description please see IBM HLASM Programmers guide Appendix D referred before.

Field Date Time Product number

Size CL8 CL4 CL8

Description The date of the assembly in the format YYYYMMDD The time of the assembly in the format HHMM The product number of the assembler that produced the

- 11 -

Product version

CL8

Product level

HL2

PTF level

CL8

System ID

CL24

Jobname Stepname Procstep

CL8 CL8 CL8

Number (SYSIN)

of

input

files

...

associated data file The version number of the assembler that produced the associated data file, in the form V.R.M and padded to the right with spaces. For example, C'1.5.0 '. A monotonically increasing numeric value which identifies the current version and release of the assembler The PTF level number of the assembler that produced the associated data file The system identification of the operating system on which the assembly was run. The value of the field is set to the value of the system variable &SYSTEM_ID. The jobname of the assembly job The z/OS stepname of the assembly step The z/OS procedure step name of the assembly procedure step The number of input files in this record. The groups of eleven input-file fields below occur n times depending on the value in this field. ... input-file information groups, one group per file, 11 fields per group.

Table 4: Job Identification record

3.2.2 External symbol dictionary record – X‘0020‘ External symbol dictionary record provides information about all the control sections defined in the program. A simplified description of the External symbol dictionary record is shown in the following table. The full description of the External symbol dictionary record is available on IBM HLASM Programmers guide Appendix D referred before.

Field Record Type

Size XL1

Flags

XL1 XL2 FL4

ESDID ... External name CL(n) Alias Section name CL(n) Table 5: External symbol record

Description X'00' Section Definition (CSECT) SD ... X'FF' Dummy Section (DSECT) (no type designator) Flags or Alignment reserved External Symbol Dictionary ID (ESDID) or zero ... The external name The alias name for the section

- 12 -

A few of ADATA records were described so reader can now tell what the ADATA is and what kind of information is provided. This thesis will now describe the way to get the ADATA binary file and translate it into XML formed output which is more user-friendly and better to process in future projects.

3.3 How to get the ADATA file ADATA assembler option needs to be specified in order to get the ADATA file during the compilation of your assembler program. The specification of the ADATA suboption of the GOFF assembler option will cause that ADATA records are written to the object data set as text records. Both options ADATA and GOFF(ADATA) can be specified to produce ADATA records in both the associated data file and the object data set. Associated data file with the SYSADATA ddname on MVS and CMS, or with the SYSADAT filename on VSE also needs to be defined.

Example of the JCL generating ADATA file from Assembler program: //ASMCLG JOB … your standard JCL job header //STEP1 EXEC HLASMCL, // PARM.C='OBJECT,NODECK,ADATA' //C.SYSLIB DD DSN=your.MACLIB.ASM,DISP=SHR //C.SYSADATA DD DISP=SHR,DSN=your.ADATA.output.dataset //C.SYSIN DD * ... your Assembler program ...

// Code example 2: JCL generating ADATA file

your.ADATA.output.dataset will contain the ADATA records describing the program you provide after running the JCL shown in the Code example 2: JCL generation ADATA file. The full description of properties of ADATA file is given in HLASM Programmers guide referred before.

- 13 -

4 Program description The Translator ADATA to XML is a program written in a C++ programming language. This programming language was chosen for easy portability between a standard PC and a mainframe running IBM z/OS. The algorithm of the translation is simple. A ADATA file is read record by record. The type of a record is recognized from the header section first. Than the appropriate class matching the type of an ADATA record is selected and data are read from the file based on the structure of the class. The XML output is printed after the whole record has been read and all variables have been properly filled. Read a header ADATA file Associate class

records

Read a record (fill class variables)

XML output

Print a record (print values of class variables)

Picture 1: ADATA record processing

4.1 Class structure Each ADATA record has one C++ class devoted to it. Those classes are children of a main class called CBase. Procedures used by all subclasses are included in the Base class which provides an interface for those sub-classes. CBase contains also three virtual methods which are implemented for CBase and also in each subclass inherited from CBase.

Those three methods are:

- 14 -

SetLength(int len) returning void The method sets the length of the record. In some subclasses the length is set in a different way than expected length=len. Also the variable length is accessed in this method. The variable length of the CBase would be accessed if the method is not virtual.

Fill(ostringstream *in) returning void This method fills the variables of the class. Each record is unique in its content therefore each class devoted to the specific record has a different way of processing it.

Print() returning string Method Print() provides a string output of the class in question.

Some of the classes with variable length includes also GetLength() method returning the actual length of the record counted from the record itself. Such classes are not those devoted to a particular ADATA record, but those devoted to some groups of entries describing the same thing like group (see chapter 4.2 ADATA translation to XML bellow). Other commonly used procedures and methods are defined within the basic class CBase.

Those are methods like ReadDouble(int length, ifstream *in) or

ReadString(int length, ifstream *in)

doing exactly what is mentioned in their

name.

The reading algorithm can be described as a state machine. The main loop reads the 12 byte header section and picks the element of an array, which is defined as an array of CBase class type. The number of this element in the array matches the record type extracted from the header section. Array in question is initialized through the subclass of the ADATA record type is linked with an element of this array, which has the same number as the record type of this ADATA record.

- 15 -

Picture 2: Class organisation schema

The program itself consists of the main file including all globally used procedures and variables. The main loop can be found in this file which is the core of this program. Basically the program runs in a loop while there are still some ADATA records left. while(!fin.eof()){ if(in != 16){ // if not ADATA cout Fill(&fin); fout Print();

// // // //

associate a class set length of a record fill in the variables print to the output

... in = mygeti(&fin); ...

// process next record

} Code example 3: The main loop of the program

- 16 -

The header is read first. A type of the ADATA record is recognized and the proper element of an array of classes is assigned. Fill and Print methods are called. This is the main algorithm of the program. The complete C++ source code of a Translator ADATA to XML is in the CD attached to this thesis.

4.2 ADATA transformation to XML The XML output of the transformation of binary ADATA file is designed to be a well—formed and user friendly XML document. Therefore the names of entries and of records were altered and changed. Also many entries were grouped together for better understanding of their relationship. The transformation table is shown in attachment [C] of this thesis.

The names of the entries and the ADATA records were transformed into values accepted by XML technology. The part of a transformation table follows:

ADATA record Job Identification Record--X'0000' ADATA Identification Record--X'0001' Table 6: Record names transformation

XML tag

Some of the ADATA records include entries that are related to each other. For example, record X’0000’ – contains information about JCL used to assembly the program ADATA provides information about. Those records were grouped in the XML output in order to better readability of the output.

ADATA entry Group of entries in JobID record. System ID Jobname Stepname Procstep

Size CL24 CL8 CL8 CL8

XML output z/OS 01.11.00 ASMCLG STEP1 C

Table 7: Grouping of entries

- 17 -

Some of those groups are appearing even in multiple ADATA records. is the best example.

Within JobID – X’0000’: ADATA entry Number of input files (SYSIN) Input file number Input file name length Input file name Volume serial number length Volume serial number Member name length Member name etc...

Size FL4 FL4 FL4 CL(n) FL4 CL(n) FL4 CL(n)

XML output name volSer mem ...

Table 8: "File" group of entries in JobID entry

Within Output file information – X‘000A‘ ADATA entry

Size FL4

Number of primary object-file (OBJECT) output files Primary object-file number Primary object-file name length Primary object-file name

FL4 FL4 CL(n)

Volume serial number length Volume serial number Member name length Member name etc...

FL4 CL(n) FL4 CL(n)

XML output name volSer mem ...

Table 9: "File" group of entries in OutputFile entry

Binary flags are other major difference between the ADATA binary structure and XML output. There are many fields used as a flag, so every bit combination means different thing. Those fields were transformed into separate XML tags named shortly to describe the value of a flag. A value of a flag itself is displayed where possible. The

in - X’0034’ can serve as an example in this case.

Definition in programmers guide: Field Type Flag

Size XL1

Description 1... .... Bit 1 = Define Constant (DC, CXD, CCW, CCW0,

- 18 -

or CCW1), Bit 0 = Define Storage (DS or DXD) .1.. .... If "Define Constant" bit is set, bit 1 indicates the operand is a CXD. If "Define Constant" bit is not set, bit 1 indicates the operand is a DXD. ..1. .... If "Define Constant" bit is set, bit 1 indicates the operand is a CCW, CCW0, or CCW1. ...1 .... Bit 1 indicates this record is associated with an object text record (X'0035'). The object text record is created when a DC statement has a duplication factor greater than 1, and at least one of the operand values has a reference to the current location counter (*). .... Table 10: Type Flag definition in programmer guide

Representation in XML output: ADATA entry

Flag

Size FL4

XML output DS

Table 11: Type Flag translation

4.3 Invoking the Translator ADATA to XML The Translator ADATA to XML is a precompiled executable program that can be invoked like any other programs through the JCL. It accepts only one input and produces two outputs with following ddnames.

DDNAME INPUT

Description ADATA file produced by the assembler. Only ADATA produced by the assembler with ADATA option specified are supported. ADATA file produced by the assembler with GOFF(ADATA) option is not supported! OUTPUT XML output as a product of a translation. It is a valid XML file containing the same information as the INPUT but formed in the XML format. SYSPRINT ddname SYSPRINT denotes an output file produced by the program with content of a standard c++ output known as a cout. Table 12: Program I/O description

Following JCL could be used to execute the Translator ADATA to XML. The user should be patient when invoking this program against a large ADATA file. Output produced by this translation will be even bigger than input file and therefore the translation will take some time. For time estimation, please, see chapter 5

- 19 -

“Experiments”. Basic JCL for execution Translator ADATA to XML is shown in Code Example 4. Proper information needs to be specified before executing this JCL.

//XMLGO JOB (accountnumber),'programmer',NOTIFY=&SYSUID // SET LOAD='load.library' // SET ADATA='adata.file' //GO EXEC PGM=TRANSL //STEPLIB DD DSN=&LOAD,DISP=SHR //INPUT DD DSN=&ADATA,DISP=SHR //SYSPRINT DD SYSOUT=* //OUTPUT DD SYSOUT=* /* Code example 4: Running Translation

load.library Name of the dataset where a copy of TRANSL program is placed. adata.file

Dataset previously created by the assembler with specified ADATA option. ADATA file should be stored in this dataset.

SYSPRINT and OUTPUT will be produced in the standard JCL output called SYSOUT. This can be overwritten to a dataset name of a user choice if needed.

- 20 -

5 Experiments The translator ADATA to XML intends to be used on daily basis in corporate projects. Therefore an amount of files, size of the output and time needed for the translation is crucial. ADATA file is usually a huge file in comparison with an Assembler language source code or a listing output of the compiler. The XML output produced by the Translator ADATA to XML is even bigger.

Picture 3: Data-flow diagram

- 21 -

5.1 Data size The amount of data processed during creation of an XML output is huge. A Data-Flow diagram is shown on picture 3: Data-flow diagram (see above) for an illustration of the process. A source code is taken by the usual assembler and compiled. Listing and ADATA file are produced during this compilation. Creating of XML using the Translator ADATA to XML is the last step in the execution.

5.1.1 Small program example The following table shows statistical data of each file produced in data-flow if assembler language program showed below is assembled and ADATA produced by the standard compiler is transformed into XML output using the Translator ADATA to XML. The translation of such a small ADATA file to XML takes only 00:00:00.05 processor time7.

Assembler language source code: START

CSECT

STM 14,12,12(13) USING START,15 A 2,FIELD1 LM 14,12,12(13) BR 14 DROP 15 FIELD1 DS CL8 FIELD2 DS CL8 END Code example 5: Simple assembler language program

Data flow statistics: Type of file Length of file (lines) File size (bytes) Assembler source code 10 820 Listing 134 6219 ADATA 50 4882 XML 630 26106 Table 13: Data amount statistics of a small program

7

The amount of time it takes for the CPU to execute a set of instructions and generally excludes the waiting time for input and output.

- 22 -

5.1.2 Bigger assembler source code Same type of statistics as shown in table 5 (see above) is shown in table 6. Comparison of file size of a bigger assembler data input is shown and a rapid growth of XML output size can be observed. The ADATA file produced by the assembler includes a huge amount of information coded in binary records, therefore the XML output produced by the Translator ADATA to XML will be more than five times larger than ADATA itself. The translation of such a file takes more time. It’s 00:00:11.55 of a processor time.

Type of file Length of file (lines) File size (bytes) Assembler source code 1925 150k Listing 10036 870k ADATA 18114 3,128M XML 316056 16,2M Table 14: Data amount statistics of a bigger program

5.2 Working with XML The XML format of output was chosen for its potential on the field of listing, searching and for the presence of query languages. This allows the user to find information he or she seeks with a simple query. XPath (XML Path Language) can be used for example. Some XPath queries are shown in the following table with an explanation of a result. The data returned by the query are not shown because of its volume.

XPath query count(//File) //File //SourceRecord

//ExternalSymbol[@type="CSECT"]

Description Number of files mentioned in ADATA All files and information about them. This query will show all rows. It will reveal the whole assembler language program as it was written in a source code. Result of this query will be a list of all CSECTs (Control sections) in the program.

Table 15: XPath queries

- 23 -

6 Conclusion The goal of this thesis it to explain mainframe programming issues in a short understandable way. This thesis is not supposed to be a full guide to the mainframe but a small introduction of a corporate programming on mainframe machines. The main purpose of the Translator ADATA to XML was to transform binary file ADATA to an XML output for further processing. One of the demands was to write the program especially for mainframe systems. This demand was not only met but also overcome. The Translator ADATA to XML is designed to work under z/OS running on IBM mainframe z/Series and also under Windows OS platform. This feature was created because of the design of the bigger project AVA, which the Translator ADATA to XML is a part of, is not strictly defined and the option running some parts of the project under the windows/PC platform was not fully rejected. This goal was successfully achieved. The program introduced in this Bachelor’s thesis does exactly the work it was created for and it is starting to be used for its purposes.

However, the processing of an Options Record – X’0010’ needs to be programmed. It was not done in this thesis because of its extent and for many binary flags included. Such a processing is not only matter of time needed to write a code but also of an agreement on translation that has not been done yet.

- 24 -

Bibliography [1]

SUTTER, Herb; ALEXANDRESCU, Andrei. C++ 101 Programovacích technik. Brno : ZONER Press, 2005. 232 pages. ISBN 9788086815282.

[2]

High-level Assembly Language : High-level Assembly Programming Philosofy and HAL Reference. 40pages.

[3]

High Level Assembler for z/OS & z/VM & z/VSE V1R6 [online]. 2008 [quot. 2010-05-17]. z/OS V1R10 information center. Available on WWW:

[4]

IBM: z/OS operating system [online].[quot. 2010-05-17]. Available on WWW:

[5]

Legacy system In Wikipedia : the free encyclopedia [online]. St. Petersburg (Florida) : Wikipedia Foundation, February 25, 2002, February 9, 2010 [quot. 2010-05-08]. Available on WWW: .

[6]

MVS JCL User’s guide [online]. New York, USA : IBM Corp, October 2001 [quot. 2010-05-17]. Available on WWW: .

[7]

IBM Mainframes [online]. 2003-01-23 [quot. 2010-05-10]. IBM Archives. Available on WWW:

[8]

IBM System z Aplication Development help system [online]. IBM.com 2004 [quot. 2010-05-11].. Available on WWW: .

- 25 -

[9]

HLASM Programmers guide Appendix D [online]. Available on WWW:

[10] IBM Archives [online]. 2003-01-23 [quot. 2010-05-10]. Available on WWW:

- 26 -

List of Attachments: Attachment A - Translator ADATA to XML user guide Attachment B - Common Header section Attachment C - ADATA to XML translation table Attachment D – Content of an enclosed CD

- 27 -

Translator ADATA to XML user guide The Translator ADATA to XML is used to translate ADATA records into XML formed output. The program is designed to work on mainframe under z/OS or MVS. The Translator ADATA to XML is a precompiled executable program that can be invoked like any other programs through the JCL. It accepts only one input and produces two outputs with following ddnames.

DDNAME INPUT

OUTPUT

SYSPRINT

Description ADATA file produced by the assembler. Only ADATA produced by the assembler with ADATA option specified are supported. ADATA file produced by the assembler with GOFF(ADATA) option is not supported! XML output as a product of a translation. It is a valid XML file containing the same information as the INPUT but formed in the XML format. ddname SYSPRINT denotes an output file produced by the program with content of a standard c++ output known as cout.

The following JCL could be used to execute the Translator ADATA to XML. The user should be patient when invoking this program against a large ADATA file. Output produced by this translation will be even bigger than input file and therefore the translation will take some time. A basic JCL for execution of the Translator ADATA to XML is shown. Proper information needs to be specified before executing this JCL.

//XMLGO JOB // // //GO //STEPLIB //INPUT //SYSPRINT //OUTPUT /*

(accountnumber),'programmer',NOTIFY=&SYSUID SET LOAD='load.library' SET ADATA='adata.file' EXEC PGM=TRANSL DD DSN=&LOAD,DISP=SHR DD DSN=&ADATA,DISP=SHR DD SYSOUT=* DD SYSOUT=*

load.library Name of the dataset where a copy of TRANSL program is placed. adata.file

Dataset previously created by the assembler with specified ADATA option. ADATA file should be stored in this dataset.

Implemented translation tables and the output format is shown in attachment ADATA to XML translation table

-I-

Common Header Section and Record Types Content of a Common header section of an ADATA records1: Field Language code Record Type

Size FL1 XL2

Description 16 – Assembler The record type, which can be one of the following:

FL1

X'0000' - Job Identification record X'0001' - ADATA Identification record X'0002' - Compilation Unit Start/End record X'000A' - Output File Information record X'000B' - Options File Information record X'0010' - Options record X'0020' - External Symbol Dictionary record X'0030' - Source Analysis record X'0032' - Source Error record X'0034' - DC/DS record X'0035' - DC Extension record X'0036' - Machine Instruction record X'0040' - Relocation Dictionary record X'0042' - Symbol record X'0044' - Symbol and Literal Cross Reference record X'0045' - Register Cross Reference record X'0060' - Macro and Copy Code Source Summary record X'0062' - Macro and Copy Code Cross Reference record X'0070' - User Data record X'0080' - USING Map record X'0090' - Assembly Statistics record 3

Associated Data Architecture level Flag

XL1

Edition number

FL1

.... ...0 Record is not continued .... ...1 Record is continued on the next record .... ..0. Length fields are big-endian (S/390,RS/6000) .... ..1. Length fields are little-endian (Intel) All other values are reserved. The edition number of this record type. The following list of edition number values can be used to determine the format of each ADATA record. The listed edition number value (or higher) indicates that the record is in the new restructured High Level Assembler Release 5 format. 1 - Job Identification record 0 - ADATA Identification record 0 - Compilation Unit Start/End record 1 - Output File Information record 1 - Options File Information record

1

HLASM Programmers guide [online]. Available on www:

-I-

3 - Options record 1 - External Symbol Dictionary record 1 - Source Analysis record 1 - Source Error record 1 - DC/DS record 1 - DC Extension record 1 - Machine Instruction record 1 - Relocation Dictionary record 1 - Symbol record 1 - Symbol and Literal Cross Reference record 1 - Register Cross Reference record 1 - Macro and Copy Code Source Summary record 1 - Macro and Copy Code Cross Reference record 1 - User Data record 1 - USING Map record 2 - Assembly Statistics record Reserved Associated Data Field length

XL4 HL2

The length, in bytes, of the data following the header

ADATA record Types2: Job Identification X'0000' Provides information about the assembly job, the host system environment, and the names of the primary input data sets. ADATA Identification X'0001' Provides a precise time stamp, and a description of the character set used for character data in the file. The time stamp is represented as Universal Time (UT) with the low-order bit representing 1 microsecond. ADATA Compilation Unit Start/End X'0002' Indicates where the associated data records for each assembly unit begin and end. The START record is written to the associated data file at the beginning of each assembly. The END record is written to the associated data file at the end of each assembly. The END record contains a count of the total number of records written to the associated data file. When there are multiple assembler programs in the input file, there is a START and END record for each program assembled. Output File X'000A' Provides information about all the assembler output files used for the assembly.

Options File X'000B'

2

HLASM Programmers guide [online]. Available on www:

- II -

Provides information about the ASMAOPT file (z/OS and CMS) or library member (z/VSE) used for the assembly, if applicable. Options X'0010' Describes the assembler options used for the assembly. External Symbol Dictionary X'0020' Describes all the control sections, including DSECTs, defined in the program. Source Analysis X'0030' Describes a single source line. There is one Source Analysis record in the file for each source record which would appear in the listing as if PRINT ON,GEN was active. This includes those source records generated by macro instructions, or included by COPY instructions. A Source Analysis record is also produced for TITLE statements. The FOLD assembler option does not cause the source in the Source Analysis record to be converted to uppercase. The Source Analysis records appear in the sequence they would appear in the listing. Conditional assembly statements might cause the source statements to be skipped or the sequence of the records to be altered. Source Error X'0032' Describes errors in source program statements. All Source Error records follow the Source Analysis record to which they apply. DC/DS X'0034' Describes the constant or storage defined by a source program statement that contains a DC, DS, CXD, DXD, CCW, CCW0, or CCW1 instruction. If a source program statement contains one of the above, then a DC/DS record is written following the Source Analysis record. If there is an error in the DC, DS, CXD, DXD, CCW, CCW0, or CCW1 instruction, the DC/DS record is not produced. If the DC statement has a duplication factor greater than 1, and at least one of the operand values has a reference to the current location counter (*), then a DC extension record (X'0035') is generated. DC Extension X'0035' This record describes the object text generated by a DC statement when the DC statement has repeating fields. This record is only created if the DC statement has a duplication factor greater than 1 and at least one of the operand values has a reference to the current location counter (*). Machine Instruction X'0036' Describes the object code generated for a source program statement. If a source program statement causes machine instructions to be generated, then a Machine Instruction record is written following the source record. If there is an error in the machine instruction, the Machine Instruction record follows the Source Error record. Relocation Dictionary X'0040'

- III -

Describes the relocation dictionary information that is contained in the object module RLD records. Symbol X'0042' Describes a single symbol defined in the program. There is one Symbol record for each symbol defined in the program, including literals. Symbol and Literal Cross Reference X'0044' Describes the references to a single symbol. All Symbol and Literal Cross Reference records follow the Symbol record to which they apply. Register Cross Reference X'0045' Describes the references to a single register. Macro and Copy Code Source Summary X'0060' Describes the source of each macro and copy code member retrieved by the program. Macro and Copy Code Cross Reference X'0062' Describes the references to a single macro, or member copied by the COPY assembler instruction. User Data X'0070' Describes the data written by the ADATA assembler instruction. Using Map X'0080' Describes all USING, DROP, PUSH USING, and POP USING statements in the program. Statistics X'0090' Describes the statistics about the assembly.

- IV -

ADATA to XML translation table This table shows the translation of an ADATA record to XM output. All ADATA records are displayed. The user can use this table for searching the right information within the XML. Field Size Job Identification Record - - X ‘0000’ Date CL8 Time CL4

Description Product number CL8 Product version CL8 Product level HL2 PTF level CL8 System ID CL24 Jobname CL8 Stepname CL8 Procstep CL8 Number of input files (SYSIN) FL4 not displayed Offset of first input - file FL4 Start of input-file information groups, one group per file. not displayed Offset of next input-file FL4 Input file number FL4 not displayed Input file name offset FL4 Input file name length FL4 not displayed Volume serial number offset FL4 Volume serial number length FL4 not displayed Member name offset FL4 Member name length FL4 Input file name CL(n) Volume serial number CL(n) Member name CL(n) End of input-file information group. ADATA Identification Record - X’0001’ Time (binary) XL8 CCSID XL2 ADATA Compilation Unit Start/End Record - - X’0002’ Indicator XL2 XL2 Record Count FL4 Output File Information Record - - X’000A’

not displayed

-I-

Number of primary object-file FL4 (OBJECT) output files Offset of first primary objectnot displayed FL4 file Number of secondary object FL4 file (PUNCH) output files Offset of first secondary object not displayed FL4 -file Number of listing (PRINT) FL4 output files Offset of first listing-file FL4 Number of terminal (TERM) FL4 output files Offset of first terminal-file FL4 Number of associated FL4 data (ADATA) output files Offset of first associatednot displayed FL4 data file Start of primary object-file information groups, one group per file. Offset of next primary objectnot displayed FL4 file Primary object-file file number FL4 Primary objectnot displayed FL4 file name offset Primary object FL4 file name length not displayed Volume serial number offset FL4 Volume serial number length FL4 not displayed Member name offset FL4 Member name length FL4 Primary object-file name CL(n) Volume serial number CL(n) Member name CL(n) End of primary object-file information group. Start of secondary object-file information groups, one group per file. Offset of next not displayed FL4 secondary object-file Secondary object FL4 file file number Secondary objectnot displayed FL4 file name offset Secondary object FL4 file name length not displayed Volume serial number offset FL4 Volume serial number length FL4 not displayed Member name offset FL4 Member name length FL4 Secondary object- file name CL (n) Volume serial number CL (n) Member name CL (n) End of secondary object-file information group. Start of listing-file information groups, one group per file. not displayed Offset of next listing-file FL4

- II -

Listing-file file number FL4 not displayed Listing-file name offset FL4 Listing-file name length FL4 not displayed Volume serial number offset FL4 Volume serial number length FL4 not displayed Member name offset FL4 Member name length FL4 Listing-file name CL (n) Volume serial number CL (n) Member name CL (n) End of listing-file information group. Start of terminal-file information groups, one group per file. not displayed Offset of next terminal-file FL4 Terminal-file file number FL4 not displayed Terminal-file name offset FL4 Terminal-file name length FL4 not displayed Volume serial number offset FL4 Volume serial number length FL4 not displayed Member name offset FL4 Member name length FL4 Terminal-file name CL (n) Volume serial number CL (n) Member name CL (n) End of terminal-file information group. Start of associated-data-file information groups, one group per file. Offset of next associated-data not displayed FL4 file Associated-data file number fFL4 Associated-data not displayed FL4 file name offset Associated-data file FL4 name length not displayed Volume serial number offset FL4 Volume serial number length FL4 not displayed Member name offset FL4 Member name length FL4 Associated-data file name CL (n) Volume serial number CL (n) Member name CL (n) End of associated-data-file information group. Options File Information - - X’000B’ Number of option FL4 (ASMAOPT) input files not displayed Offset of option file FL4 Start of option-file information groups, one group per file. not displayed Offset of next option file FL4 Option file number FL4 not displayed Option file name offset FL4 Option file name length FL4 not displayed Volume serial number offset FL4 Volume serial number length FL4 not displayed Member name offset FL4

- III -

Member name lenght FL4 Option file name CL (n) Volume serial number CL (n) Member name CL (n) End of option-file information group.



Options Record - - X’0010’

Not implemented

External Symbol Dictionary Record - ‘X0020’

Reserved Reserved Reserved Reserved not displayed not displayed

Record Type

XL1

Flags

XL1

External Name offset

XL2 FL4 AL4 AL4 FL4 FL4 FL4 XL8 FL4

External Name length

FL4

Alias Name offset Alias Name length

FL4 FL4

ESDID Address or Alignment Section Length Owner ID

External name

CL (n)

Alias Section name

CL (n)

Source Analysis Record - - X’0030’ ESDID FL4 Statement number FL4 Input record number FL4 Parent record number FL4 Input assigned file number



FL4



FL4 FL4 XL1 XL1 XL1 XL2

Reserved

Source record type (within source record origin)

XL1



Assembler operation code

XL1

Flags

XL1 AL4 AL4 AL4 AL4

Parent assigned file number Location Counter Input record origin Parent record origin Print flags

Address 1 Address 2

not displayed Reserved Reserved

- IV -

Offset of name entry in statem ent field Length of name entry Offset of operation entry in statement field

FL4



FL4

XL4

Reserved

FL4

not displayed

FL4



FL4

not displayed

FL4



FL4 FL4 XL8

not displayed Reserved

FL4

Length of operation entry

FL4

Offset of operand entry in stat ement field

FL4

Length of operand entry

FL4

Offset of remarks entry in statement field

FL4

Length of remarks entry

FL4

Offset of continuation indicat or field

FL4

Input macro or copy member name offset Input macro or copy member name length Parent macro or copy member name offset Parent macro or copy member name length Source record offset Source record length Input Macro or copy member name Parent macro or copy member name Source record

CL (n)



CL (n)



CL (n)



Source Error Record – X’0032’ Statement number Error Identifier Error Severity Error message offset Error message length Error Message

FL4 CL16 HL2 FL4 FL4 XL8 CL (n)

not displayed Reserved

DC/DS Record - - X’0034’ ESDID Type Flag

FL4 XL1 Reserved XL5 Statement Number FL4 Number of operands FL4 not displayed Offset of operands FL4 Start of operand group, one group per operand.

-V-

Offset of next operand Location Counter Duplication Factor Bit Offset Type Attribute Type Extension Program Type

FL4 FL4 FL4 XL1 XL1 CL1 XL4 XL4 FL4 FL4

not displayed Reserved

Number of values Offset of values End of operand group. Start of nominal value group, one group per value. not displayed Offset of next nominal value FL4 not displayed Value offset FL4 Byte length FL4 Bit length FL4 Nominal value XL(n) End of nominal-value group. DC Extension Record - - X’0035’ ESDID Statement number Location Counter Object text offset Object text length Object text

FL4 FL4 FL4 XL8 FL4 FL4 XL(n)

Machine Instruction Record - - X‘0036‘ ESDID Statement number Location Counter Instruction offset Instruction length Value of Instruction

FL4 FL4 FL4 XL8 FL4 FL4 XL(n)

Reserved not displayed Reserved not displayed not displayed

Relocation Dictionary Record - X’0040’ POS.ID FL4 REL.ID FL4 AL4 Address AL4 Flags XL1

Reserved

Symbol Record - - X’0042’ ESDID Statement Number Location Counter Symbol Type Duplication Factor Type Attribute Assembler Type



FL4 FL4 FL4 XL1 FL4 XL1 CL4



- VI -

Program Type Length attribute Integer attribute Scaling attribute Symbol Flags Symbol name offset Symbol name length Symbol name

XL4 FL4 HL2 HL2 XL1 XL7 FL4 FL4 CL(n)

SymbolFlag flag=""> Reserved not displayed

Symbol and Literal Cross Reference Record - - X’0044’ Statement Number FL4 Relocatability Type CL1 Reserved XL7 not displayed Name offset FL4 Name length FL4 Total references FL4 Number of references FL4 Offset of references FL4 Name CL(n) Start of reference groups, one group per reference. Statement Number FL4 Reference Flag CL1 End of reference groups. Register Cross Reference Record - X’0045’ 0 Register number XL1 G Register Type CL1 Reserved XL2 Total references FL4 Number of references FL4 not displayed Offset of references FL4 Start of reference groups, one group per reference. Statement Number FL4 Reference Flag CL1 End of reference groups. Library Record -- X’0060’

Concatenation number FL4 not displayed Library name offset FL4 Library name length FL4 not displayed Volume serial number offset FL4 Volume serial number length FL4 not displayed DDNAME offset FL4 DDNAME length FL4 Number of members FL4 not displayed Offset of members FL4 Library name CL (n) Volume serial number CL (n) DDNAME CL (n) Start of member groups, one group per member.

- VII -

Offset of next member Member name offset Member name length Member name End of member groups.

FL4 FL4 FL4 CL(n)

Library Member and Macro Cross Reference Record - - X’0062’



Concatenation Number

FL4

Statement Number

FL4

Concatenation Type

CL1

Statement Definition Flag

CL1 XL8 FL4 FL4 FL4 FL4

Member or macro name offset Member or macro name length Parent name offset Parent name length

not displayed not displayed

Primary input 2446 none Reserved

not displayed Total references FL4 Number of references FL4 not displayed Offset of references FL4 Member or macro name CL(n) Parent macro name CL(n) Start of reference groups, one group per reference. ...Statement Number FL4 ...Reference Flag CL1 End of reference groups. User - supplied Information Record - - X’0070’ User field 1 User field 2 User field 3 User field 4 User data offset User data length User data USING Map Record - X’0080’ Record type USING Flag Location ESDID Statement number Location Counter USING value Last statement USING ESDID Register Displacement

XL4 XL4 XL4 XL4 FL4 FL4 CL(n)

not displayed

XL1 XL1 FL4 FL4 FL4 FL4 FL4 FL4 XL1 XL2



- VIII -

USING range Label offset Label length Label

XL1 FL4 XL2 FL4 FL4 CL(n)

Statistics Record - - X’0090’ Buffer pool allocation Required In-storage

FL4 FL4

Primary input records

FL4

Library records Work file reads

FL4 FL4

Print records written

FL4

Object records written

FL4

Work file writes ADATA file writes

FL4 FL4

ADATA calls ADATA added records ADATA deleted records

FL4 FL4 FL4

ADATA diagnostic messages

FL4

Library calls Library added records Library deleted records

FL4 FL4 FL4

Library diagnostic messages

FL4

Listing calls Listing added records Listing deleted records

FL4 FL4 FL4

Listing diagnostic messages

FL4

Object calls Object added records Object deleted records

FL4 FL4 FL4

Object diagnostic messages

FL4

Source calls Source added records Source deleted records

FL4 FL4 FL4

Source diagnostic messages

FL4

Reserved 4096 Reserved not displayed

- IX -

Punch calls Punch added records Punch deleted records

FL4 FL4 FL4

Punch diagnostic messages

FL4

Term calls Term added records Term deleted records

FL4 FL4 FL4

Term diagnostic messages

FL4

Assembly start time Assembly stop time Processor time ASMAOPT input records

FL4 FL4 FL4 FL4 XL4

Number of functions

FL4

Reserved

Offset of functions FL4 Start of external-function groups, one group per function. Offset of next external not displayed FL4 function Reserved XL4 SETAF function calls FL4 SETCF function calls FL4 Messages issued FL4 Messages severity HL2 not displayed External function name offset FL4 External function name length FL4 External function name CL(n) End of external-function groups.

-X-

Content of an enclosed CD /binary Binary file TRANSL executable under MVS system on mainframe is included. Also binary file transl.exe executable on windows platform PCs is included. /docs The folder “docs” includes all documentation needed for running the TRANSL program and transl.exe. /examples An example of assembler source code, ADATA file produced by the compiler and XML produced by the TRANSL program can be found in this folder /project MS Visual Studio project is placed in this folder. It includes all files needed and used for further editing and developing the project. /source Complete C++ source code with headers is included in this folder /thesis The PDF and DOC files of a Bachelor’s thesis can be found in this folder

-I-