EasyManua.ls Logo

HP TACL User Manual

HP TACL
235 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #106 background imageLoading...
Page #106 background image
Listing a File
Accessing Files
4–18 107365 Tandem Computers Incorporated
Figure 4-7. Listing a File (Page 3 of 5)
== Get dates macro
[#DEF get_dates TEXT |BODY|
#SET bin_date [#FILEINFO/MODIFICATION/ [file:input(0:33)]]
#SETMANY year month day file_hour file_min, &
[#CONTIME [bin_date]]
#SET file_date &
[#COMPUTE ((year - 1900) * 100000) + (month * 100) + day]
#SETMANY year month day list_hour list_min, &
[#CONTIME [#TIMESTAMP]]
#SET list_date &
[#COMPUTE ((year - 1900) * 100000) + (month * 100) + day]
]
== Main Part of the Code
=============================================================
== Look for the input file name. If empty, drop out of the
== loop and display an error.
[#IF NOT [#EMPTY %1%] |THEN|
#SET file:input(0:33) [#SHIFTSTRING/UP/%1%]
== Look for the out file name. If empty, use the default
== OUT file.
[#IF NOT [#EMPTY %2%] |THEN|
#SET file:output(0:33) [#SHIFTSTRING/UP/%2%]
|ELSE|
#SET file:output(0:33) [default_outfile]
]
== Open the input file for read access.
#SET err_inp [#REQUESTER/WAIT/READ [file:input(0:33)] &
err_inp rec_inp prompt]
[#IF err_inp <> 0 |THEN| == open error; drop out of loop.
#OUTPUT [file:input(0:33)] not open; error: &
[err_inp]
|ELSE|
== If the output file already exists, purge it.
[#IF [#FILEINFO/EXISTENCE/ [file:output(0:33)]] |THEN|
SINK [#PURGE [file:output(0:33)] ]
]
== Save (push) the current #OUT setting, then set it to
== the new value.
#PUSH #OUT
#SET #OUT [file:output(0:33)]

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the HP TACL and is the answer not in the manual?

HP TACL Specifications

General IconGeneral
NameHP TACL
PurposeTask automation, system management, and application control
CategorySoftware
PlatformHP NonStop
TypeScripting language
DeveloperHewlett-Packard

Summary

Section 1 An Overview of TACL

Running the Examples in This Manual

Instructions for executing manual examples, including setting required variables.

About This Manual

Section 2 Developing TACL Programs

Processing Character Data

Covers tasks like constructing text strings, analyzing output, and manipulating characters.

Debugging TACL Programs

Introduces the TACL debugger for step-by-step execution and variable examination.

Section 3 Developing TACL Routines

Processing Arguments

Details how routines handle arguments using #ARGUMENT, including options and alternatives.

Writing an Exception Handler

Explains handling events like BREAK keys or TACL errors using exception handlers.

4 Accessing Files

#REQUESTER Operation

Describes the #REQUESTER function for opening files and initiating I/O operations.

Requesting Waited Reads

Explains opening files for waited read operations using #REQUESTER.

5 Initiating and Communicating With Processes

Initiating a Process: RUN and #NEWPROCESS

Covers starting processes using RUN and #NEWPROCESS, including startup options.

6 Running TACL as a Server

Running a TACL Process as a Server

Explains making a TACL process a server by establishing its IN file as $RECEIVE.

Running TACL Code as a Server

Details providing TACL code for a TACL-server process using #INPUTV and #REPLYV.

Using TACL as a Pathway Server

Describes creating a Pathway environment with TCP and TACL servers to process requests.

7 Using Programmatic Interfaces

8 Example of a System Management Program

Related product manuals