Browse Prior Art Database

User Defined Functions and Operators

IP.com Disclosure Number: IPCOM000086478D
Original Publication Date: 1976-Sep-01
Included in the Prior Art Database: 2005-Mar-03
Document File: 2 page(s) / 15K

Publishing Venue

IBM

Related People

Bianchi, C: AUTHOR [+3]

Abstract

Any Interactive Management of Time Series (LMTS)[*] user can create new functions, which cannot be reconstructed by means of existing functions, and use them as operators of the language.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 49% of the total text.

Page 1 of 2

User Defined Functions and Operators

Any Interactive Management of Time Series (LMTS)[*] user can create new functions, which cannot be reconstructed by means of existing functions, and use them as operators of the language.

As examples, a new method of estimation, or an operator executing cross- section analyses on time series data or a command to print both time series and particular values according to a certain format, can be considered. All the previous functions belong to the dynamic loading special functions category.

In order to define his new function, the user has to write a FORTRAN or Assembler program, whose file name must be equal to the name of the operator he wants to introduce in the language. The name of the new operator will be different from all the existing operators.

The program must have USER as entry point (in FORTRAN, therefore, the first statement must be SUBROUTINE USER (parameter 1, parameter 2, ...)) and have a standard list of parameters, among which, in particular, a double precision X vector, NSERIE, NVALUE, INANNO, INTERM, NFINAN, NFITER (integers), FLAG (logical). The selected data are put by IMTS in the X vector, starting from the first element, series by series, timewise (NVALUE is the number of values for each series, NSERIE is the number of selected series).

IMTS, transparently to the user, has previously performed the necessary compatibility controls which result in series with the same length, referred to a common period of which INANNO and INTERM are initial year and month (or quarter), NFINAN and NFlTER the final ones.

In general, the user program will perform some elaborations on the X vector data. If the output of the program is only the printing of some results, without using these results with other operators in the same IMTS command, it is enough to specify FLAG = .TRUE. at the end of the program. If, on the contrary, the result of the program must be a series (or a constant) to be used in connection with other operators in the same IMTS command, the resulting series must be put at the beginning of the X vector and the statement FLAG = .FALSE. must be written.

Example of application: The user wants to introduce the ROWMAX operator which, when applied to a certain number of time series, gives back a new series having, for each period, the maximum among the values of the initial series (a simple example of cross-section analysis on the rows). By means of the EDIT subcommands of CMS, the user begins to write a file with identifier ROWMAX FORTRAN. By means of a GET subcommand the user copies inside his file the file USER FORTRAN available to all the users in a read-only disk. This file holds the statement SUBROUTINE USER with the correct list of the parameters and the comment cards with the necessary explanations.

After that, the user must finish his program with the statements which, starting from the X vector data, create, again in the X vector, the resultant series. Finally, the program...