21
TANDEM Help file Index TANDEM Help file TAL Data Types: Control statements: Standard Functions Compiler Directives Procedures and Subprocedures Multitasking & Multithreading Types of registers: Addressing mode: INSPECT: DDL: BIND ENSCRIBE Comparison of Structured files Record Management Functions Summary NonStop SQL/MP Access Options Lock Modes Views Indexes Partitions SQL Catalogs what are audited and non-audited tables? Remote Database Facility (RDF) Safeguard security management facility ENFORM: COBOL Program Organization Description of records: Procedure Division Program Compilation and Execution Pathway Pathway System Components: PATHCOM Commands Configuring the PATHMON Environment TACL TACL Variables Few Functions and Commands: Enabling TACL Debugger: ?SECTION Directive OSS (Open System Services) gtacl Utility Compilation Tools Summary of VI commands Cutting and Pasting/Deleting text Inserting New Text Moving the Cursor Within the File Moving the Cursor Around the Screen Replacing Text Searching for Text or Characters Manipulating Character/Line Formatting Saving and Quitting Miscellany My additions: EX Commands FAQ: GUARDIAN Help: G-Series Highlights and Migration Planning Guide Tandem NonStop TCP/IP Layering Socket Library Routines Internet Addresses Port Numbers TCP/IP Basic Steps TAL Ads by Google Compuware's Hiperstation Automated Mainframe Testing and Efficient Application Auditing. www.compuware.com Award-Winning FacePainter ...& Balloon Artist Extraordinaire! Fully-insured - 778.228.1116 www.f aceaballoonza.com Willem De Kooning L & M Arts specializes in artworks by Willem De Kooning www.lmgallery .com Local Coupons 1 ridiculously huge coupon a day. Get 50-90% off your city's best! www.Groupon.com

Help File for HP TANDEM

  • Upload
    mrpopa

  • View
    727

  • Download
    9

Embed Size (px)

Citation preview

Page 1: Help File for HP TANDEM

TANDEM Help file

Index

TANDEM Help file

TAL

Data Types:Control statements:Standard FunctionsCompiler DirectivesProcedures and SubproceduresMultitasking & MultithreadingTypes of registers:Addressing mode:

INSPECT:

DDL:

BIND

ENSCRIBE

Comparison of Structured files

Record Management Functions Summary

NonStop SQL/MP

Access OptionsLock ModesViews

IndexesPartitionsSQL Catalogswhat are audited and non-audited tables?Remote Database Facility (RDF)Safeguard security management facility

ENFORM:

COBOL

Program OrganizationDescription of records:Procedure DivisionProgram Compilation and Execution

Pathway

Pathway System Components:

PATHCOM Commands

Configuring the PATHMON Environment

TACL

TACL VariablesFew Functions and Commands:Enabling TACL Debugger:?SECTION Directive

OSS (Open System Services)

gtacl UtilityCompilation Tools

Summary of VI commands

Cutting and Pasting/Deleting textInserting New TextMoving the Cursor Within the FileMoving the Cursor Around the ScreenReplacing TextSearching for Text or CharactersManipulating Character/Line FormattingSaving and QuittingMiscellanyMy additions:EX Commands

FAQ:

GUARDIAN Help:

G-Series Highlights and Migration Planning Guide

Tandem NonStop TCP/IP

Layering

Socket Library Routines

Internet Addresses

Port Numbers

TCP/IP Basic Steps

TAL

Ads by Google

Compuware's HiperstationAutomated Mainframe Testing and

Efficient Application Auditing.www.compuware.com

Award-Winning FacePainter...& Balloon Artist Extraordinaire!

Ful ly-insured - 778.228.1116www.f aceaballoonza.com

Willem De KooningL & M Arts special izes in artworks by

Willem De Kooningwww.lmgallery .com

Local Coupons1 ridiculously huge coupon a day.

Get 50-90% off your city's best!www.Groupon.com

Page 2: Help File for HP TANDEM

TAL is single pass, high level, block structured language that works efficientlywith the system hardware to provide optimal object program performance.

Data Types:

Data Type Description

STRING 8-bit integer byteINT, INT(16) 16-bit integer wordINT(32) 32-bit integer double wordFIXED, INT(64) 64-bit fixed point quadruple wordREAL, REAL(32) 32-bit floating point double wordREAL(64) 64-bit floating point quadruple wordUNSIGNED(n) n-bit field, where 1 <= n <= 31

To convert word address to byte address use left shift e.g.

int var;string .var_ptr := @var '<<' 1;

When you initialize int with string then compiler allocated byte in the left and keep right vacant but when you assign it does reverse. REAL has E while REAL(64) has L. e.g.REAL -17.2E-1REAL(64) -17.2L-1 when you specify the unsigned variable you must do it as belowUNSIGNED(5) bit_var;You cannot initialize UNSIGNED variable when you declare it.

Compare Literals and Defines: Literal declaration associated identifier with constant values while defineAssociates identifier with text.No Storage for literals and defines. e.g.Literal a, here a is assigned 0, b assigned 1and c 2. b, c; DEFINE increment (x) = x := x +1 #; Define declarations are not invoked when1. Within comment2. Within char string constant.3. On the left side of declaration. For e.g. following DEFINE y will invoke but not x int x:= y; Thus Literal is named CONSTANT and define is named TEXT.

ARRAY:You cannot initialize extended indirect local arrays or UNSIGNED arrays.

ReadOnlyArray: Allocates storage in user code segment. They are sometimesReferred as P-relative array because they are addressed using program counter(P-register). As code segment have no primary & secondary areas, read onlyarray must be direct. You must initialize read-only arrays. UNSIGNED read-onlyarrays are not allowed because they cannot be initialized.STRING prompt = 'P' := ["Enter Character: ",0];INT error = 'P':= ["INCORRECT INPUT"]; Declaration of array:INT b_array[0:19]; UNSIGNED (1) flags[0:15]We declare extended array as INT .extGlobal primary area: 256 wordsLocal primary area: 128 wordsTotal of primary & secondary area = 32K words.When you use . symbol then variable is stored in secondary area.Sub-local area has no secondary area; so sub-local array cannot be indirect. Initialize array:int .numbers[0:6] := [1,2,3,4,5,6,7];Local extended arrays cannot be initialized. When you declare Standard Indirect Array, compiler allocates1. Word of storage in global (local) primary area of user data segment for implicit pointer.2. Then allocates space for array in global (local) secondary area.3. Initialize pointer in step 1 with 16-bit address of array. When you declare Extended Indirect Array, compiler allocates 1. Double-word of storage in global (local) primary area of user data segment for implicit pointer. 2. Then allocates space for array in automatic extended segment. 3. Initialize pointer in step 1 with 32-bit address of array. Copying from one array to another:new_Array[0] ':=' old_array[0] FOR byte_count BYTES. Compiler does standard move and returns 16 bit next address if

Page 3: Help File for HP TANDEM

both arrays have byte address or both arrays have word address.It returns 32 bit address if one array has byte and other has word oreither array has extended address. Comparisons are unsigned whether u use signed or unsigned.signed = < > <= >= <>unsigned '='. '<', '>'. '<='. '>='. '<>' ***IMP** The move statement treats negative number as UNSIGNED so make sure thatno negative number is there. Number such as -1 is treated as 65535.

STRUCTURES:Definition: Describes structure layout and allocated storage.Template: Describes structure layout but no storage.Referral: allocated storage for previously declared structure. Structure declared in subproc must be direct. Large structure should be usedwith .ext, e.g. struct .ext inventory[0:1999]begin

int item;int quantity;fixed(2) price;

end; Template should be defined as belowstruct inventory(*);BEGIN int item; int price;END; Referral:struct .customer(inventory) [1:49]; Structure elements:You cannot initialize array when declared as structure element. INDEX of standard indirect structures must be a signed INT exp. whileindex of extended indirect structures must be a signed INT or INT(32)depending upon offset. To copy structures used_struct ':=' s_struct FOR elements If you use BLOCK declaration then u must NAME the compilation unit.If the current compilation unit has private block declaration , then NAMEidentifier has global scope among all the compilation units. No othercompilation unit in the target file can use the same identifier at the globallevel. If the current compilation unit has no private block, then identifier hasglobal scope within current compilation only.NAME - UNBLOCKED GLOBAL DATA--- BLOCKED GLOBAL DATA -PROC DEC. Statements:ASSERT : conditionally invokes the procs defined in ASSERTION directive.?ASSERTION 5, PROCESS_DEBUGASSERT 10 :$CARRY Move statement:array[0] ':=' num * [" "] -> @next_addr; SCAN statement:SCAN byte_ptr[0] UNTIL "," ;IF $CARRY is true after SCAN UNTIL then test char doesn't found. IF $CARRYis true after SCAN WHILE then char other than test char not found. STACK statement:loads values into the register stack.STORE statement:removes values from the register stack. PRIVILEGED PROCEDURES:The following types of procs executes in privileged mode.CALLABLE or PRIV proc:A nonpriv procedure that is called by a CALLABLE or PRIV procedures. proc submain CALLABLE;beginend;Only procedures that operates in privileged mode, can access system global data.

Control statements:

IF ... thenELSE

CASE area_code OF BEGIN

Page 4: Help File for HP TANDEM

408,415-> location := bay_area; 213,308-> location := los_angeles; OTHERWISE-> location := elsewhere; END; While loop tests condition for each iteration, if condition is falseit stops executing. WHILE item < len DOBEGIN array[item] := 0; item := item +1;END; DO loop executes till condition is false.DOBEGIN i:= i+1;ENDUNTIL i>6;

FOR index := 0 TO limit DO array[index] := o; FOR index := 0 TO limit BY 5 DO...

Sharing data in mixed language programming: To share C global data with TAL routine:

1. In C declare global data compatible with TAL type.2. In TAL module declare pointers to the above data using C compatible type.3. In TAL, write module to which C can pass address of the shared data.4. In TAL module, initialize pointers with the address send by C.5. Use pointers to access C data.

C code#include <stdio.h>short arr[5]; /* data to be shared */char charr[5]; /* data to be shared */ _tal void INIT_TAL_PTR(exptr short *, exptr char *); main(){ INIT_TAL_PTR( &arr[0], &charr[0]);} TAL codeINT .ext tal_int_ptr; -- pointers to above dataSTRING .ext tal_string_ptr; -- pointers to above data PROC INTI_TAL_PTR(c_addr1, c_addr2);INT.ext c_addr1 ;STRING .ext c_addr2;BEGIN@tal_int_ptr := c_addr1;@tal_string_ptr := c_addr2;END; To share TAL global data with C routine:

1. In TAL declare global data compatible with TAL type.2. In C module declare pointers to the above data using TAL compatible type.3. In C, write module to which TAL can pass address of the shared data.4. In C module, initialize pointers with the address send by TAL.5. Use pointers to access TAL data.

TAL Code: INT .EXT tal_inti_array[0:4]; ! tal data to be shared with CSTRUCT .EXT tal_struct(rec); INT PROC init_c_ptrs(tal_intptr, tal_charptr) language C; INT .EXT tal_intptr; Struct .ext tal_strptr;EXTERNAL; C Code: short *c_int_ptr;char *c_char_ptr; short INIT_C_PTRS( short *tal_intptr, char *tal_charptr){ c_int_ptr = tal_intptr;

Page 5: Help File for HP TANDEM

c_char_ptr = tal_charptr; return 1;}

Guidelines to use TAL with CRE:1. Specify ENV COMMON directive. SET any heap red by ?HEAP directive.2. Include CRELIB, TALLIB lib files.3. USE CRE_INITILISER, CRE_TERMINATOR etc.4. Do not write data to upper 32k word area directly.5. When error occurs CRE routine returns to TAL without doing any action so TAL routine must handle error conditions.

Standard Functions Type Transfer:$DBL : converts INT to INT(32)$DBLL : INT to INT(32)$INT : converts INT(32), REAL to INT$DFIX : INT(32) to FIX.$FIXD : FIX to INT(32)$FIXI : FIX to INT$EFLT : INT to REAL$SCALE: Used to moves the decimal point in FIXED(fpoint) expression. Address transfer:$XADR : standard to extended$LADR : extended to standard Character test:$ALPHA, $NUMERIC, $SPECIAL Minimum, max:$LMIN, $LMAX : unsigned$MIN, $MAX : signed Carry & overflow:$CARRY, $OVERFLOW Variable:$LEN,$OCCURS,$TYPE

Compiler Directives Compiler Input:?ABORT, ?SECTION,?SOURCE: sources in code from the another input source file Compiler Listing:?CODE, ?LIST, ?PAGE, ?SUPPRESS Diagnostic:

?ERRORFILE: logs compilation errors & warning to an error file so that u canfix the errors using TACL FIXERRS macro. Errorfile is of code 106.

?ERRORS, ?RELOCATE ?WARN Object File Content:?SQL: Prepares for NonStop SQL statements Conditional Compilation:?DEFINETOG, ?ENDIF, ?IF, ?SETTOG, ?RESETTOG Runtime Environment:?DATAPAGES: Sets the size of the data area in the user data segment.?EXTENDSTACK: Increases the size of data stack in the user data segment,?HEAP: Sets the size of CRE user heap.?HIGHPIN, ?SYMBOLS, ?SAVEABEND, ?INSPECT ,

Following directives accept filename as argument.?ERRORFILE, ?LIBRARY, ?SAVEGLOBALS, ?SEARCH, ?SOURCE, ?USEGLOBALS

• Error 57: symbol table overflow.

• To remove symbols from object use STRIP <objname>.

Procedures and Subprocedures Difference between proc & subproc:

• Proc scope is global in program, subproc scope is local.

• Proc can contain another subprocs, but subproc cannot contain other subproc.

• Procs are callable from anywhere in program, subprocs are callable from proc only.

• 127 words for primary storage of procs, for subproc its 27 words.

• Subproc don't have any secondary area.

To convert variable proc into extensible use keyword EXTENSIBLE and specify thenumber of parameters in variable procs. e.g.proc msg ( a, b,c, new_param) EXTENSIBLE (3)This specifies new_param has new param and 3 in original variable proc. Use $OPTIONAL for parameter checking.

Page 6: Help File for HP TANDEM

Multitasking & Multithreading

• Multitasking doing multiple tasks at a time in foreground and background. Types are Context multitasking, time slicing, and co-operative.

• During single tasking only one process is active at a time and other are suspending but in multitasking all are active none is suspending state.

• Multitasking is a parallel processing where program makes use of multiple CPUS built into hardware.

• Multithreading: Internet explorer. Task divided into threads.

Types of registers:

Program register: contains address of next instruction.instruction register: contains currently executing instruction.local: beginning address of local data area.

stack: address of last word allocated.

register stack: contains registers(RO-R7) that compiler uses.Environment: info about current process, RP

Addressing mode: Direct: It uses 16-bit addressing. Requires only one reference. It’s not absolute. It’s relative to the base of global, local or sub-local. You can use this only in lower 32k area. Standard indirect & extended indirect: Requires to 2 memory references. Firstlocation that contains address and second that contains data.Standard indirect is 16-bit addressing system. It’s byte or word inlower 32k and word in upper 32k. Extended is always 32-bit addressing.

Managing Addresses:You can use upper 32k word area of the current user data segment if you are not using CRE. USE DATAPAGSES directive such as ?DATAPAGES 33.To accesses word address in upper 32K area use standard 16-bit pointer.To access byte address use 32-bit extended pointer.INT .std_ptr := %10000; first 16-bit word address in UPPER 32k area.INT .ext top_ptr := %20000D; first 32-bit byte address in UPPER 32K area. Use $XADR to convert standard address into extended address.Int .std_ptr := %10000;Int .ext ext_ptr;@ext_ptr := $XADR(std_ptr);

Managing large block of memory:LITERAL head_size = 19D;INT .EXT poolhead := %20000D;INT .EXT pool := %20000D + head_size;INT .EXT block;status := DEFINEPOOL(poolhead, pool, head_size);@block := GETPOOL(poolhead, 1024D);CALL PUTPOOL(poolhead, block);

INSPECT:

Inspect for high level debugging.source code debug., default decimal Debug for machine level debug, address mode, m/c code , control program, default octal.low level TRACE command differs slightly from high level TRACE. HIGH levelcommand includes an entry for the current scope unit while low level doesn't Difference between low level inspect & debug:low level inspect doesn't support DEBUG ALL parameter when setting breakpoint,Low level inspect allows to write output to disk file, debug to non-disk filesuch as spooler.Debug allows you to modify code locations. You cannot modify code locationwith either low level or high level inspect.Low level inspect displays address in extended mode while Debug showsin 16 bit word address. execution by instruction by Instruction.local system customization :INSPLOCLpersonal customization :INSPCSTM For debugging across network, expand link should be there, remote password,inspect should be started remotely. High level: source level access, symbols should be included , default decimallow-level: machine level access, no symbols required, default octal.Difference in command such as break, modify, trace.Add source assign command enables u to inform inspect where to find source filewhen their location has changed. To generate break point for specific time usebreak #procname EVERY 10 TEMP 3, break #procname TEMP 5 etc.. THEN clause allows u to use list of command in " ". such asbreak #procname THEN "modify vara; resume"break #procname EVERY 42 IF vara< 100DISPLAY arr, display arr WHOLE gives array element in " ". display arr planeshows element without array name. FROM clause is used if we have two functions with the same name. DEBUG:For multiple code segment u must specify the code segment where address islocated, as well as address.UC :USERCODE SPACE, UL : user library

Page 7: Help File for HP TANDEM

b #UC.1 means usercode space and segment #1.Display VALUE clause is useful.To show address use d (@var)display x FORMAT (E10.4, E10)Info segment gives info about segment likesegid, length, description, Type, swapfile.List alias AS COMMANDS.Modifying strings: When u modify string, new string cannot exceed 250 bytes, to avoid this modify string in parts.Use modify whole to modify the elements of array.Set status line25 & set status scroll commands control the informationInspect displays in the event-message system.show subproc scoping local | sublocal

Two types of Buffering/reading system:1. Cache buffering:2. Sequential block buffering:

block is physical I/O size between Guardian-90 and disk. Cache buffering:Record to be retrieved is searched in cache, if present moved to applicationprocess, if not then record is moved from disk to cache, and then to application process. If you read file sequentially, use SBB. This applies to READ ONLY and not WRITEWith SBB entire block is returned from disk process to PFS. Subsequent read isdone entirely by file system and no hardware disk access, no communication withdisk and no environment changes, reduces I/O.

DDL:Dictionary maintenance.1. Generating backup schema. ddl >?dict <dict^name> ?source <source outputfile> output * 2.Adding new object to dict.If new object has the same name as old one , ddl replaces the old one with new one, but for new constant it gives error message.?dict <dict name>?source <source file> 3. Deleting object:?dict <dict name>?delete <object^name>For deleting reference object use OUTPUT UPDATE <object^name> 4. Modifying object:Modifying records, SPI TOKEN are easier as they are never referenced by any other object. 5. Moving dictionary from one place to another.Moving non-audited dictionary is simpler than audited. USE FUP DUP, FUP ALTER to alter the alternate key file of dict.e.g.FUP DUP DICTKDF, $VOL.SUBVOL.*VOLUME $VOL.SUBVOLFUP ALTER DICTKDF, ALTFILE(0,DICTALT) ?DICT : creates AUDITED dict.?DICTN: creates NON-AUDITED dict.?DICTR: opens dict for READ-ONLY. ?TALBOUND command is useful for setting bounds..?TALBOUND 1, ?TALBOUND 0?talunderscore , converts hyphens into underscores, by default it convertsinto circumflex.

Compare TACL Routine & Macro:

• Arguments in macro are substituted without check. each argument is checked by position. Routine can check its argument type by #argument, and can compute its own result.

• Macro is used where limited need of validating argument is required and no condition exists.

• Routine can handle exceptions, check argument, and control flow of program.

BIND

The Binder program is a tool you can use to read, link, modify, and build executable object files. You can bind C, COBOL85, Pascal and TAL object files, including SQL program files.Follow the guild lines when you bind SQL program files:

Treat SQL program files like other object files.

Bind object files after they are compiled by C compiler. (You can bind object files after sunning the SQL compiler; however the binding operation invalidates the resulting target file, and

you must then explicitly recompile the program file to validate it)

SQL compile only the final bound object; you are not required to separately SQL compile each object of a multiple module program.

If you do not specify the RUNNABLE pragma when you compile the a single-module program, you must explicitly use the binder program to set this attribute in the object file, otherwise itdoes automatically.For a multiple-module program, use the Binder program to combine the object code from each module into a single executable object file.You can run Binder program from TACL prompt by BIND command.

Page 8: Help File for HP TANDEM

ENSCRIBE

Enscribe is a disc file architecture that is supported by the GUARDIAN 90 file system, provides high-level access to records in a database. Disk file Types:

• Unstructured

• Structured: key-sequenced, entry-sequenced and relative.

Comparison of Structured files Key-Sequenced Entry-Sequenced Relative

1 Records are ordered by the value in

primary-key field.Records are in the order in whichthey are entered.

Records are ordered by relativerecord number.

2 Access is by primary or alternatekey.

Access is by record address oralternate key.

Access is by record number oralternate key.

3 Length of primary key varies. Keyis actually part of record.ENSCRIBE uses index blocks tolocate primary key, which is storedin record.

Record address is primary key.Length: 4 bytes.ENSCRIBE uses record address tofind physical location of record infile.

Record number is primary key.Length: 4 bytes.ENSCRIBE uses record number toperform calculation to find physicallocation of record in file.

4 Space occupied by a recorddepends on length specified whenwritten.

Space occupied by a recorddepends on length specified whenwritten.

Space allowed per record is

specified when the file iscreated.

5 Free space in block or at end offile is used for adding records.

Space at the end of file is used foradding records.

Empty positions in file are used foradding records.

6 Records can be deleted,shortened, or lengthened (withinthe maximum size specified).

Records cannot be deleted,shortened, or lengthened.

Records can be deleted,shortened, or lengthened (within themaximum size specified).

7 Space freed by deleting orshortening a record can be reused.

A record cannot be deleted, but itsspace can be used for anotherrecord of the same size.

Space freed by deleting a recordcan be reused.

Record Management Functions Summary

Function Procedure Description

Delete WRITEUPDATE From Key-seq or relative as indicated by primary-key value.Find KEYPOSITION,

POSITION

Insert WRITE

Lock LOCKREC,LOCKFILE,READLOCK,READUPDATELOCK

Unlock UNLOCKREC,UNLOCKFILE,WRITEUPDATEUNLOCK

Read READ Read subset of records sequentiallyUpdate READUPDATE,

WRITEUPDATERandom position in file

BIG filesOn Tandem, Enscribe and SQL are the (only) two ways by which an application program can maintain its data. Enscribe, with the help of DP2 disk process, manages database of an application in the form of records. It also maintains data integrity in case of fatal errors. Initially, Enscribe was designed to support files upto 2GB size. Since disk drives available at that time were of few 100 MBs only, a limit of 2GB was found sufficient. Moreover, since integerswere used to hold record pointers and EOF information, 2GB could fit well into a signed integer (2^15 = 2GB). To suffice application needs of huge data files (files larger than 2GB), concept of partitioning was introduced. But there is a maximum limit of 16 partitions for a file in Enscribe. SQL, whichwas introduced later, had no such limits. Moreover, SQL allows adding and deleting partitions to Key Sequenced tables, which is not possible with Enscribe Key Sequenced Files. With the invention of disk drives greater than 2GB (Disks of size 72GB disks are expected in future), 2GB limit seemed to be a restriction on Enscribe, which needed to be overcome. WithD46 release of NSK for K-Series Systems (and G06 for S-Series Systems), Enscribe supports unpartitioned files of size 1TB (1024 GB). The new (Big File) version of file is called Fomat 2 file, whereas the older version has been termed as Format 1.Note: Format 2 File Concept is valid only for database files. EDIT Files (Code 101), Object Files (Code 100 or 700) and all other files having reserved Code Number (Code Numbers Between

100 and 999) cannot be Format 2.

What is the meaning of Primary Extents, Secondary Extents and MAXEXTENTS?

An extent is a set of n disk pages (n = value of extent). An enscribe file is created with extents. A disk page represents 2K of data (= 2048 bytes).Extents are allocated in consistent data blocks on the physical disk drive.

Primary extent: The disk space 'booked' when the first data is written to the file. The size is defined by the value of Primary Extent Size.Secondary extent: Whenever the first/previous extent is filled up, new disk space is 'booked'. The size is defined by the value of Secondary Extent Size.

MAXEXTENTS: The maximum value of extents to allocate for a file (1 primary + 1 or more secondary extents).The Primary extent is the amount of physical disk space allocated for a file when the first piece of data is written to it. When that space is filled, a Secondary extent is allocated based on thesize given in the file description. The maximum number of extents for a file is determined by the value of MAXEXTENTS, and is the total number that will be allocated to a file before it isconsidered "full".

Example: Creating a file with Ext (5000, 3000), MaxExtents 16 means: The first write will allocate (reserve or book if you want) 5000 pages on the physical disk = 5000 * 2048 = 10.240.000 bytes (= ~10MB). Once you filled the ~10MB of data, a next extent isallocated. The size is 3000 pages on the physical disk = 3000 * 2048 = 6144000 (= ~6MB). Same scenario when this extent is filled. MAXEXTENTS delimits the maximum file size. In thisexample the maximum data size all in all will be (5000 + (15 * 3000)) * 2048 = 50000 * 2048 = 102400000 (= ~100MB) Notes: Allocating extents takes time. The bigger the data income/growth, the bigger the extents should be. If you know you have a lot of data use a big primary extent so that the seek timeis reduced because the data will be stored in a physically contiguous space. A once allocated extent is not freed automatically when data is deleted (or fup purgedata is done). You canrelease unused allocated extents with the 'FUP Deallocate' command.

What is Enscribe? A file system or a database management system?Enscribe is NOT a file system. It is a hierarchical type of database management system. Tandem systems support two kinds of databases: NonStop SQL/MP which is a RelationalDatabase Management system, and Enscribe

UNSTRUCTED FILES:Separate current-record, & next-record pointers are associated with eachopening of file, so if same file is opened several times, each opening providesa logical separate access. But only one EOF pointer is there so only one

Page 9: Help File for HP TANDEM

process can append data.You can access file by RANDOM access by using POSITION call. CALL POSITION(filenum, 81920D);CALL READUPDATE(filenum, buffer, 512);CALL WRITEUPDATE(filenum,buffer,512); Appending to the ENDcall POSITION(filenum, -1D);

KEY-SEQUENCED FILES:logical record = blocksize-32Maximum record size allowed is blocksize-32.Key-Compression: leading charsIndex-Compression: trailing chars To insert recordcust rec := ' ' & cust rec for $LEN(cust rec)-1 BYTES; Then fill record.& writeWRITE(file num, rec, $len(rec)); To UpdateREADUPDATEWRITEUPDAE To deleteWRITEUPDATE(filenum, rec, 0); i.e. set recordlength 0filetype 3N = (blocksize-30)/ (recordsize+2);2 bytes are for record control info. ENTRY-SEQUENCED FILES:Primary key is constant length 4 bytes address. They are not designed forrandom access.logical record size = block size = 24 filetype 2You can read RANDOMLY by alternate key.N = (blocksize-22)/ (recordsize+2); RELATIVE FILEFiletype = 1relative record number.Once you create file and written record to it, all records preceding recordsare also created and actually occupy the space, even though they don't containdata. This is very SERIOUS LIMIATION of relative file. You can insert record to any available position by giving -2D option.for EOF use -1D option.Files are suited for random access with fixed length records and where recordnumber has some meaningful relationship to particular piece of data.N = (blocksize-22)/ (recordsize+2);

Extent size:FORMAT1 MAX 65535 pagesFORMAT 2: 536,870,912 Buffer is for unstructured file; block size is for structured file.Maxextent for every file excluding key seq. is 16,For key-sequence it is more than 16.

NonStop SQL/MP

• Integrity refers to data that is accurate, valid and consistent according to rules established for changing the database.

• Concurrency refers to the ability of two or more processes to gain access to the same data at the same time. With more concurrency, a greater number of transactions can complete in a given timeframe.

Access Options

Browse Access: It ignores existing locks and does not acquire any locks. Browse access is also known as read through locks or dirty reads. Immediate access to a data, but

lowest consistency and highest concurrency.

Repeatable Access: Repeatable access locks all the data accessed through the DML statement. If the transaction reads the same row multiple times, the row will contain the same

data. Each row locked with repeatable access stays locked until the corresponding transaction is committed. Highest consistency and lowest concurrency.

Stable Access: Stable access requires that when a row is retrieved, it must not be locked in an exclusive manner by another transaction. This is useful for reading only committed

data. In general, each row locked with the stable access is released when the next row is read, if the row was accessed but not updated. Guarantees that no other user can access

data that is locked by transaction or cursor. Medium consistency and concurrency. Stable Access is the default.

Lock Modes Lock mode controls access to locked data.

Exclusive: The lock owner can access and modify the data. This is typically specified for multi-step updates or deletes, where data is selected and then updated or deleted, to

eliminate the need to convert a shared lock to an exclusive lock.

Shared: Multiple uses can lock and read the same data. Inserts, updates, and deletes, however, can only be done by the lock owner.

Views

Page 10: Help File for HP TANDEM

A View is a specification of columns and rows from one or more base tables. View is a virtual table.

Comparison of Protection Views and Shorthand Views:

Protection View Shorthand View

Derived from only one table Derived from any number of tables and other viewsCan be secured separately from the table on which it isbased.Protection view provides column-level security by

restricting access to individual columns.

Derives it’s security from the tables or views on which itis based.

Allow modification of data Allows reading but not modification of data.

IndexesIf you often need to look up table values in a sequence different from the primary-key sequence, you can create an index table. The table on which an index is based is called the base table. Primary key is called the primary index.Index definitions are stored separately from base table definitions. Each index has a name and is stored in a key-sequence file of the same as the index. Index files are not tables, and youcan not query an index directly. Index provides faster access to tables. PartitionsPartitions can make data more accessible in a large table or a table used at different geographical locations. A partition of a table or index holds all the rows within a range of key values. SQL CatalogsA NonStop SQL/MP catalog consists of a set of table on a single subvolume. Catalog tables contain specific information about SQL objects and programs, such as keys, comments,columns, partitions, attributes and interdependencies. DEFINE: A DEFINE is a named set of attributes and associated values stored in the process file segment (PFS) of a running process. Using the DEFINEs can simplify the SQL/MPenvironment. You can establish one to one mapping between logical names and physical names.

what are audited and non-audited tables?Audited table is a table flagged for auditing by the Transaction Management Facility (TMF). The TMF subsystem monitors all transactions against an audited table in preparation for possible transaction back-out, volume recovery, or file recovery. Non-audited tables are not protected by transactions and follow adifferent locking and error handling model than audited tables. InSQL/MX, certain situations such as DML error occurrences or utilityoperations with DML operations can lead to inconsistent data within anon-audited table or between a non-audited table and its indexes. The *only reliable* means of determining whether a file or table is audited is to examine the audit attribute in one of the following ways:1) (TACL) #FILEINFO /AUDITED/2) (TAL, C, Cobol) CALL FILE_GETINFOLIST[BYNAME]_3) Look for "A" in column 20 of the output from FUP INFO 4) Look for "A" in column 19 of the output from TACL FILEINFO

Remote Database Facility (RDF)In the event of an environmental disaster, Tandems Remote DatabaseFacility (RDF) provides rapid recovery of your database by letting you maintaina current online copy of all or part of the database at another site.The presence of the backup is transparent to applications.If you are running NonStop TM/MP, no application code has to be changed to implement RDF.In addition, RDF allows users to perform read operations from remote duplicate databases,improving response times.

Safeguard security management facilityTo protect your data from unauthorized use, unauthorized modification, or destruction, Tandems Safeguard security management facility enables you to implement a full range oforganizational security policies for your NonStop servers and their users.

ENFORM:

1. Retrieve data from the database.

2. Perform calculations such as addition, subtraction, multiplication, and division upon retrieved data.

3. Sort and group the retrieved data.

4. Perform cumulative operations (such as counting, totaling, and averaging) upon the retrieved data.

5. Format and print a report containing the retrieved data.

6. Create a new physical file containing the retrieved data. The ENFORM language consists of statements, clauses and commands that you use to provide ENFORM with a detailed description (called a query specification) of the data to be retrievedfrom the data base, the operations to be performed on the data, and the form in which the data is to be returned to you.

Establishing and Clearing Relationships:Statements:LINK: Create a session-wide link; used to link records descriptions for a queryLINK OPTIONALDICTIONARYDELINK : Clears links from the internal table. DELINK OPTIONALCLOSE Commands:?SHOW LINK: Display session-wide links currently in effect?DICTIONARY Selecting the information:LIST: Selects information to be printed in the reportFIND: Selects information to be placed in a new physical file called FIND file Clauses:

Page 11: Help File for HP TANDEM

WHERE, BY, BY DESC, ASCD, DESC, SUBTOTAL, TOTAL, PCT, CUM AT END, AT START, FOOTING, SUBFOOTING, SUBTITLE, TITLE

Compiling and Executing Query: Non-interactive Mode::ENFORM/IN test1, OUT $s/ Interactive Mode example:ENFORM

?SOURCE addfile1

SET @display-count to 24;

OPEN employee;

LIST empnum, empname, job;

ENFORM Query and Report example: ENFORM Query:-- establish Query environmentOPEN parts, fromsup;DECLARE u-var INTERVAL F3.2;SET u-var TO 0.10; LIST parts.partnum, ----------- field name “ – “, ---------- literal partname, ---------- field name suppnums, ----------- field name

(IF inventory GT 0 THEN inventory ELSE zero --------- IF/THEN/ELSE expressionheading “STOCK”,

((price+ (price * u-var)) – partcost ---------------arithmetic expressionheading “New Profit”

AVG(inventory OVER ALL) ---------------------aggregateHeading “AVG/Stock”,

WHERE parts.partnum EQ fromsup.partnum; ---------------Links parts to fromsup

COBOL

Program Organization

1. Identification Division: program id, author, date etc. 2. Environment Division

• Configuration Section:a. SOURCE-COMPUTER paragraphb. OBJECT-COMPUTER paragraphc. SPECIAL-NAMES paragraph: (relate hardware names to user specified names, change currency sign. Change function of commas and periods)

• Input-Output Section:a. FILE-CONTROL paragraph: file control entries in general, for sequential files, line sequential files, relative files, index files (record key/alternate record key), sort-

merge files b. I-O-CONTROL paragraph: Specifies positioning information for a tape file or the sharing of a memory area for more than one file. c. RECEIVE-CONTROL paragraph: To define the two tables used by $RECEIVE this paragraph is used. Two tables are: receive-control (requester table) and reply

table.

3. Data Division

• FILE Section: external files. Defines the characteristics of the program’s files.

• WORKING-STORAGE Section: Defines records and misc data items for the process to use. You can set the initial values for the data items here. 01(elementary) level, 77level, 66(rename items) or 88 (condition-names for values) level

• EXTENDED-STORAGE Section: similar to working-storage, but this describes data to be stored in the single area of the extended memory (used by extended addressingmode on Tandem)

• LINKAGE Section: Describes Data passed by the calling program to the program containing the LINKAGE section.

• SCREEN Section (Only in SCOBOL): base screen and overlay screen.

• MESSAGE section (Only in SCOBOL)

4. Procedure Division5. End program header

Description of records: Levels 01 to 49: Data description entry that starts at level-01 is a record description entry. It defines the chars of records and it follows subordinate data description entries for the items that are part of thatrecord. FILLER KeywordREDEFINE clause: enables you to describe one computer storage area in more than one way. Data items level-66 and level-88 can not be redefined.EXTERNAL clause: specifies that record data item is external.GLOBAL Clause PICTURE Clause:

9: Numeral X: Char

Page 12: Help File for HP TANDEM

A: Letter/Space V: Decimal S: Signed P: Assumed Decimale.g.PPP999 - .000375999PP – 37500.03 NUMBER-ONE PIC S9(3)V99 VALUE –3.25 USAGE ClauseSIGN ClauseOCCURS ClauseSYNCHRONIZED ClauseJUSTIFIED ClauseBLANK WHEN ZERO ClauseVALUE Clause Level 66: Rename item: causes new data name to the item, or to two or more contiguous items in a record. This does not causes allocation of storage.

Level 77: Noncontiguous elementary items:In the working storage or extended storage section, you do not need to use the record structure to define elementary items that bear no hierarchical relationship to one another. Instead, youcan classify and define them as noncontiguous elementary class with special level no 77. Level 88: Condition names for valuesYou can assign a name to a specific value, set of values, or range of values that data item can have and use that name as a condition in a conditional statement. Name is calledcondition-name, data item is called conditional variable.e.g.05 RETURN-CODE PIC 99. 88 END-OF-FILE VALUES 01. 88 ERROR-ON-READ VALUE 02.

88 PERMANENT-ERROR VALUE 04. IF END-OF-FILE PERFORM END-UP-OPERATION

CLOSE FILE-INEND-IF

Procedure DivisionStatement always start with COBOL verb & ends with period. Sentences can be grouped together to form paragraph. Paragraphs are grouped to form section. Imperative (Non Conditional) Verbs:e.g.: ACCEPT, DISPLAY, ADD, ALTER, CALL, GO TO, INITIALIZE, SET, OPEN,COMPUTE, MOVE, LOCKFILE Conditional Statement:e.g.: EVALUATE, IF, RETURN, SEARCH, (READ & AT END or INVALID KEY phrase), (CALL with EXCEPTION phrase)

Program Compilation and ExecutionCOBOL85/IN MYSRC, OUT $SPOOL, PRI 140/MYPROG; ICODE; LMAP * SCOBOLX/IN MYSRC, OUT #LSTFILE/ tcl-prog fileTcl-prog file: can not be longer than 5 chars (if not specified POBJ is used)

The SCOBOL compiler does not produce discrete objects for each sourcecompiled. Instead, the object is packed into the POBJCOD object file,with an entry in the POBJDIR directory file, and any symbols in thePOBJSYM file. Execution with the use of following TACL commands:RUN, RUND, ASSIGN, PARAM, CLEAR, DEFINE COBOL85 interview questions: 1) Explain the $RECEIVE concept.2) What is a server vs. a requestor?3) What is "context free" programming?4) How many bytes of storage does a PIC S9(4) COMP field use?5) Explain when you would use NATIVE-2, NATIVE-4, or NATIVE-8.6) Are you familiar with any of the COBOL85 Intrinsic functions? 6a) If Yes, describe one.7) List some of the compiler directives you have used and what theydo.8) What are the basic elements required to write a NonStop program?9) Can you explain the RECEIVE-CONTROL table and how it is used?10) What elements are needed to use embedded SQL in a COBOL85 program?11) How many nested loops are possible in COBOL-85?12) What is the Array limit?13) What are the screen section variables?

Pathway

Pathway System Components:

PATHMON (Pathway Monitor): The central controlling process for pathway system operations

PATHCOM: The command interface to PATHMON

TCP (Terminal Control Process): The process that interprets Requester (e.g. SCOBOL) object code and controls the terminals running transaction processing application.

Requester-programs: Usually provide presentation services for terminal devices and communicate with server processes.

Server-processes: Perform database operations in response to messages received from requesters and reply to those messages.

Page 13: Help File for HP TANDEM

TMF (Transaction Monitoring Facility): The data management product that is available for use with Pathway to maintain the consistency of the database and provide the tools for

database recovery.

INSPECT – The interactive, symbolic program debugging tool.

LINKMON process: Multi-tasking process that handles the interface to Pathway servers from requesters other than SCOBOL requesters. e.g. Pathsend requesters, workstation clients

that use RSC, POET and NonStop TUXEDO clients. Each CPU in a system has one LINKMON process, which is shared by all the Pathsend requesters running in a given CPU.

Pathsend Requesters: These are requesters written in languages other than SCOBOL that use the Pathsend procedure calls to access pathway server classes.

PATHCOM Commands

PATHCOM Commands Valid Objects

ABORT TERM

ADD PROGRAM, SERVER, TCP, TERM

ALTER PROGRAM, SERVER, TCP, TERM

DELETE PROGRAM, SERVER, TCP, TERM

FREEZE SERVER (Prohibits communication between a terminal and server

class)

INFO PATHMON, PATHWAY, PROGRAM, SERVER, TCP, TERM

INSPECT TERM

RESET PROGRAM, SERVER, TCP, TERM

RESUME TERM

RUN PROGRAM

SET PATHMON, PATHWAY, PROGRAM, SERVER, TCP, TERM

SHUTDOWN

SHUTDOWN2

PATHMON

START PATHWAY, SERVER, TCP, TERM

STATUS LINKMON, PATHMON, PATHWAY, SERVER, TCP, TERM

STOP PATHMON, SERVER, TCP, TERM

THAW SERVER (Removes the prohibition imposed with the FREEZE

command)

Configuring the PATHMON Environment

Pathway Object Few Configuration Attributes

PATHMON MAXASSIGNS, MAXPARAMS, MAXSERVERCLASSES, MAXSERVERPROCESSES, MAXSTARTUPS,

MAXTCPS, MAXTERMS,

PATHWAY MAXLINKMONS, MAXPATHCOMS, MAXPROGRAMS, OWNER, SECURITY, all above

TCP CPUS, HIGHPIN, MAXTERMS, TCLPROG, MAXSERVERCLASSES, MAXSERVERPROCESSES,

MAXTERMS, INSPECT, PROCESS, PROGRAM

TERM FILE, TCP, AUTORESTART, INSPECT, TMF

PROGRAM OWNER, SECURITY, TCP, TMF, TYPE

SERVER PROCESSTYPE(Guardian/OSS), AUTORESTART, CPUS, DELETEDELAY, CREATEDELAY, DEFINE,

MAXSERVERS, MAXLINKS, NUMSTATICS,

TACL

Tandem Advanced Command Language (TACL) is the standard command interface to the Tandem NonStop kernel. In addition to providing full command interpreter facilities, TACL is a high-level programming language.

TACL Variables

TEXT: Contains text or a sequence of TACL statements. Similar to simple variables used by other programming languages.

ALIAS: Contain the name of TACL variable. ALIAS variable allows you to invoke by a different name, the alias name.

e.g. variable “s” for the STATUS command:[#DEF s ALIAS |BODY| STATUS]

MACRO: Contains a sequence of TACL statements. Arguments presented to the macro are substituted without interpretation or checking, for dummy arguments (%n%) in the macro

text; each argument is referenced by position.

e.g. ?SECTION fn MACRO FILENAMES %1% e.g. Filename: HEYMAC contains:?TACL MACRO#FRAME#PUSH file^name#SET file^name %1%#OUTPUT File Name is [file^name]UNFRAME To run this macro:>HEYMAC thisfileFile Name is thisfile>

ROUTINE: Contains a sequence of TACL statements. Routine can parse its own arguments (TACL supports several predefined argument types) and can compute it’s own result.

Argument handling: #ARGUMNT, #MORE, RESTRoutines own expansions: #RESULTMultiple exit points: #RETURNHandle exceptions: #EXCEPTION, #FILTER, #RAISE, #ERRORTEXT e.g. Filename ROOTN contains:?TACL ROUTINE#FRAME#PUSH file^nameSINK [#ARGUMENT /VALUE file^name/ FILENAME]#OUTPUT File Name is [file^name]

Page 14: Help File for HP TANDEM

#UNFRAME To run this routine>ROOTN thatfileFile Name is \NODE.$VOL.SUBVOL.THATFILE>

STRUCT: Contains binary data and a set of type definitions that control the conversion of the binary information to and from associated textual representations.

DELTA: Contains a sequence of commands for the TACL low level text manipulator (#DELTA).

DIRECTORY: Contains an entire set of variables. It has a hierarchical structure.

Few Functions and Commands:

Allocate and define variables: #PUSH, #DEF, #SET, #SETV, #SETMANYDelete variables: #POP, #KEEP, #UNFRAME, #RESET FRAMESAccessing variable contents: #OUTPUT [var1]Using variable as an argument: #OUTPUTC var1

Enabling TACL Debugger:From within the macro or routine, type#SET #TRACE –1TACL waits for an instruction before it performs it’s first expansion. At this point you can set breakpoints and either resume execution or step through the code.

?SECTION DirectiveUse this directive to signal the beginning of a variable definition in a file. This directive allows you to create a library that contains definitions for many variables.?SECTION var-name var-type To cause TACL to interpret or execute the contents of the file. use the LOAD command or #LOAD built-in function to load the contents into memory.e.g. LOAD /KEEP 1/mymacsTo invoke a variable after it is loaded, type the variable name.

OSS (Open System Services)

An open system environment is available for interactive or programmatic use with the Tandem NonStop Kernel. Processes that run in the OSS environment use the OSS ApplicationProgram Interface (API).Interactive uses of the OSS environment use the OSS shell for their command interpreter. The OSS API and shell are similar to those provided by the UNIX operating system.OSS provides portable applications which can move between Tandem system and another platform with ease. To achieve the portability, applications are written with standardized API, a setof functions common to multiple platforms. Guardian files on the local node appear as OSS file in the / G directory of the OSS file system. The node is the local node, because you can not remotely access a file in / G.Pahnames in the / G directory with more than 3 components after the / G/ cannot be accessed as Guardian files. /G/volume1/subvol1/myfile gtacl Utility gtacl runs a process in the Guardian environment from the OSS environment and lets you use Guardian tools from the OSS shell. You can use gtacl to start an interactive TACL process.e.g. $ gtacl –c ‘status *,user’

File type conversion tools:TEDIT Creates 101 files. Files in / G directory created with an OSS editor such as vi have a type of 180.Convert type 180 file to type 101 file on TACL prompt:>CTOEDIT ossfile, editfileConvert type 101 file to type 180 file on TACL prompt:>EDITTOC editfile, ossfile

Compilation ToolsThe c89 utility controls the C compilation system in the OSS environment.e.g.c89 test1.c -> Output file is: a.outc89 –o testout test1.c -> output file is testout, Compiles, links, produces executable program file.

Starting the inspect:Guardian: ?RUN INSPECT or >INSPECTOSS: $ gtacl –p inspect

Staring the Inspect and Program at same time:Guardian: >RUND gprogOSS: $ run –debug –inspect=on ossprog

Summary of VI commands

Cutting and Pasting/Deleting text "

Specify a buffer to be used any of the commands using buffers. Follow the " with a letter or a number, which corresponds to a buffer.D

Delete to the end of the line from the current cursor position.P

Paste the specified buffer before the current cursor position or line. If no buffer is specified (with the " command.) then 'P' uses the general buffer.X

Delete the character before the cursor.Y

Yank the current line into the specified buffer. If no buffer is specified, then the general buffer is used.d

Delete until where. "dd" deletes the current line. A count deletes that many lines. Whatever is deleted is placed into the buffer specified with the " command. If no buffer is specified,then the general buffer is used.

pPaste the specified buffer after the current cursor position or line. If no buffer is specified (with the " command.) then 'p' uses the general buffer.

xDelete character under the cursor. A count tells how many characters to delete. The characters will be deleted after the cursor.

yYank until , putting the result into a buffer. "yy" yanks the current line. a count yanks that many lines. The buffer can be specified with the " command. If no buffer is specified, then

Page 15: Help File for HP TANDEM

the general buffer is used.

Inserting New Text A

Append at the end of the current line.I

Insert from the beginning of a line.O

(letter oh) Enter insert mode in a new line above the current cursor position.a

Enter insert mode, the characters typed in will be inserted after the current cursor position. A count inserts all the text that had been inserted that many times.i

Enter insert mode, the characters typed in will be inserted before the current cursor position. A count inserts all the text that had been inserted that many times.o

Enter insert mode in a new line below the current cursor position.

Moving the Cursor Within the File ^B

Scroll backwards one page. A count scrolls that many pages.^D

Scroll forwards half a window. A count scrolls that many lines.^F

Scroll forwards one page. A count scrolls that many pages.^H

Move the cursor one space to the left. A count moves that many spaces.J

Move the cursor down one line in the same column. A count moves that many lines down.^M

Move to the first character on the next line.^N

Move the cursor down one line in the same column. A count moves that many lines down.^P

Move the cursor up one line in the same column. A count moves that many lines up.^U

Scroll backwards half a window. A count scrolls that many lines.$

Move the cursor to the end of the current line. A count moves to the end of the following lines.%

Move the cursor to the matching parenthesis or brace.^

Move the cursor to the first non-whitespace character.(

Move the cursor to the beginning of a sentence.)

Move the cursor to the beginning of the next sentence.{

Move the cursor to the preceding paragraph.}

Move the cursor to the next paragraph.|

Move the cursor to the column specified by the count.+

Move the cursor to the first non-whitespace character in the next line.-

Move the cursor to the first non-whitespace character in the previous line._

Move the cursor to the first non-whitespace character in the current line.0

(Zero) Move the cursor to the first column of the current line.B

Move the cursor back one word, skipping over punctuation.E

Move forward to the end of a word, skipping over punctuation.G

Go to the line number specified as the count. If no count is given, then go to the end of the file.H

Move the cursor to the first non-whitespace character on the top of the screen.L

Move the cursor to the first non-whitespace character on the bottom of the screen.M

Move the cursor to the first non-whitespace character on the middle of the screen.W

Move forward to the beginning of a word, skipping over punctuation.b

Move the cursor back one word. If the cursor is in the middle of a word, move the cursor to the first character of that word.e

Move the cursor forward one word. If the cursor is in the middle of a word, move the cursor to the last character of that word.h

Move the cursor to the left one character position.j

Move the cursor down one line.k

Move the cursor up one line.l

Move the cursor to the right one character position.w

Move the cursor forward one word. If the cursor is in the middle of a word, move the cursor to the first character of the next word.

Moving the Cursor Around the Screen

Page 16: Help File for HP TANDEM

^E

Scroll forwards one line. A count scrolls that many lines.^Y

Scroll backwards one line. A count scrolls that many lines.z

Redraw the screen with the following options. "z<return>" puts the current line on the top of the screen; "z." puts the current line on the center of the screen; and "z-" puts the currentline on the bottom of the screen. If you specify a count before the 'z' command, it changes the current line to the line specified. For example, "16z." puts line 16 on the center of thescreen.

Replacing Text C

Change to the end of the line from the current cursor position.R

Replace characters on the screen with a set of characters entered, ending with the Escape key.S

Change an entire line.c

Change until . "cc" changes the current line. A count changes that many lines.r

Replace one character under the cursor. Specify a count to replace a number of characters.s

Substitute one character under the cursor, and go into insert mode. Specify a count to substitute a number of characters. A dollar sign ($) will be put at the last character to besubstituted.

Searching for Text or Characters ,

Repeat the last f, F, t or T command in the reverse direction./

Search the file downwards for the string specified after the /.;

Repeat the last f, F, t or T command.?

Search the file upwards for the string specified after the ?.F

Search the current line backwards for the character specified after the 'F' command. If found, move the cursor to the position.N

Repeat the last search given by '/' or '?', except in the reverse direction.T

Search the current line backwards for the character specified after the 'T' command, and move to the column after the if it's found.f

Search the current line for the character specified after the 'f' command. If found, move the cursor to the position.n

Repeat last search given by '/' or '?'.t

Search the current line for the character specified after the 't' command, and move to the column before the character if it's found.

Manipulating Character/Line Formatting ~

Switch the case of the character under the cursor.<

Shift the lines up to where to the left by one shiftwidth. "<<" shifts the current line to the left, and can be specified with a count.>

Shift the lines up to where to the right by one shiftwidth. ">>" shifts the current line to the right, and can be specified with a count.J

Join the current line with the next one. A count joins that many lines.

Saving and Quitting \

Quit out of "VI" mode and go into "EX" mode. The EX editor is the line editor VI is build upon. The EX command to get back into VI is ":vi".Q

Quit out of "VI" mode and go into "EX" mode. The ex editor is a line-by-line editor. The EX command to get back into VI is ":vi".ZZ

Exit the editor, saving if any changes were made.

Miscellany ^G

Show the current filename and the status.^L

Clear and redraw the screen.^R

Redraw the screen removing false lines.[

Escape key. Cancels partially formed command.^

Go back to the last file edited.!

Execute a shell. If a is specified, the program which is executed using ! uses the specified line(s) as standard input, and will replace those lines with the standard output of theprogram executed. "!!" executes a program using the current line as input. For example, "!4jsort" will take five lines from the current cursor position and execute sort. After typing thecommand, there will be a single exclamation point where you can type the command in.

&Repeat the previous ":s" command.

.Repeat the last command that modified the file.

:Begin typing an EX editor command. The command is executed once the user types return. (See section below.)

Page 17: Help File for HP TANDEM

@Type the command stored in the specified buffer.

URestore the current line to the state it was in before the cursor entered the line.

mMark the current position with the character specified after the 'm' command.

uUndo the last change to the file. Typing 'u' again will re-do the change.

My additions: >>Vi –R <file-name> open in Read Only modehijk for arrows To search and replace wordShift :S/<word1>/<word2>/g -----in one line%S/<word1>/<word2>/g ----in full file

Yanking:Y – copy line to bufferP – pasteU – undo5Y – copy 5 lines to the bufferr – replace one charR – overwritecw – change worddw – delete word :set all:set noshowmode$ /set filecvi la….. ---------expandscntr-b – back pg(full), cntr-u – back pg(half)cntr-f – next pg(full), cntr-d – next pg(half)shift G – file end, :1 – file startshift 4 – go to EOLshift 6 – start of linew – word by word forward, b – backword, e-end of wordJ – join lines(align para)i <enter> - break:wq – save and quit, q – quit, q! –force quit, w! – test.sql(save as)

EX Commands

The VI editor is built upon another editor, called EX. The EX editor only edits by line. From the VI editor you use the : command to start entering an EX command. This list given here is notcomplete, but the commands given are the more commonly used. If more than one line is to be modified by certain commands (such as ":s" and ":w" ) the range must be specified before thecommand. For example, to substitute lines 3 through 15, the command is ":3,15s/from/this/g".

:ab string stringsAbbreviation. If a word is typed in VI corresponding to string1, the editor automatically inserts the corresponding words. For example, the abbreviation ":ab usa United States ofAmerica" would insert the words, "United States of America" whenever the word "usa" is typed in.

:map keys new_seqMapping. This lets you map a key or a sequence of keys to another key or a sequence of keys.

:qQuit VI. If there have been changes made, the editor will issue a warning message.

:q!Quit VI without saving changes.

:s/pattern/to_pattern/options

Substitute. This substitutes the specified pattern with the string in the to_pattern. Without options, it only substitutes the first occurence of the pattern. If a 'g' is specified, then alloccurences are substituted. For example, the command ":1,$s/Dwayne/Dwight/g" substitutes all occurences of "Dwayne" to "Dwight".

:set [all]Sets some customizing options to VI and EX. The ":set all" command gives all the possible options. (See the section on customizing VI for some options.)

:una stringRemoves the abbreviation previously defined by ":ab".

:unm keysRemoves the remove mapping defined by ":map".

:vi filenameStarts editing a new file. If changes have not been saved, the editor will give you a warning.

:wWrite out the current file.

:w filenameWrite the buffer to the filename specified.

:w >> filenameAppend the contents of the buffer to the filename.

:wqWrite the buffer and quit

FAQ:

1) How do you MOVE files from one subvolume to another on a Tandem system? Is there a FUP MOVE command? How do you rename a subvolume on a Tandem system?(A) Suppose you want to MOVE "all" files from a subvolume $DATA00.FIRST to the subvolume $DATA00.SECONDFUP RENAME $DATA00.FIRST.* , $DATA00.SECOND.*You may replace the wild-card * with any file-name template. This command is as good as renaming the subvolume FIRST to SECOND.

(2) How do you extract preliminary information from a SAVEABEND file?(A) On Inspect prompt issue the command--INFO SAVEFILE FILE ZZSA3126

Page 18: Help File for HP TANDEM

(3) What is Garth?(A) Garth is a symbolic, high-level tool that does low-level debugging, working on both live system (via TCP-IP) as well as processor images (dumps). It includes features of gdb, Crunch, aswell as powerful, new utilities. Garth was originally the brainchild of Hieu Tran when he was working on Native Mode 1. Based upon the GNU Debugger (GDB) as well as the Tcl/Tk scriptinglanguage, it is easily flexible and extensible, as users can write their own scripts and invoke them when desired. Garth is available for various UNIX platforms including Sun-OS, Solaris, aswell as for Tandem NSK. Details available on Garth home-page at http://nskernel.web.tandem.com/garth/

(4) What is HIGHPIN?(A) Each process that runs in a CPU has a Process Indentification Number (PIN) that uniquely identifies it. Before the Dxx release, there was a limit of 256 processes that could run at thesame time in a CPU. A PIN could take a value between 0 and 255. The Dxx release increased the limit on the number of processes that can run in a CPU. (It also increased many otherlimits). Processes that run in PINs greater than 255 are called HIGHPIN processes, the others are called LOWPIN processes - what else :-) This is all fine and dandy, except that programsmay require changes in order to run in a high pin. This is because HIGHPINs are stored as 16 bit integers, and LOWPINS are stored as 8 bit integers. The Guardian procedure calls that areused for process management were revamped. The old calls are still there, but for the most part they can only be used on LOWPIN processes. If a program wants to run in a HIGHPIN, orwants to communicate with another process that runs in a HIGHPIN, it will need to be changed to use the new procedure calls. Also, there are a new set of system messages (that are readfrom $RECEIVE) that relate to HIGHPIN processes. Again, the old messages are still there, but are only useful for LOWPIN processes.

(5) What are the differences in the pointers in Tandem C and TAL? (A) Differences between TAL and C pointers include the following:·TAL structure pointers can point to a byte or word address.· C structure pointers always point to a word address. To pass a C structure pointer to a TAL routine that expects a byte structure pointer, you must explicitly cast the C pointer to type char. · TAL pointers are dereferenced implicitly.· C pointers are usually dereferenced explicitly.· Small-memory-model C routines use 16-bit pointers only.· Large-memory-model C routines use 32-bit pointers only, even if the pointers refer to the user data segment. In global structure declarations, you must specify _lowmem in the storageclass of the declaration.· If a TAL routine expects a 16-bit pointer, the C pointer you pass must refer to an object in user data space.

(6)What is BASE24?

Many customers around the world use BASE24 to manage devices, route and switch transactions, and provide authorization support for high-volume payments processing. The softwareoperates on Compaq NonStop Himalaya systems to provide 24/7 support for ATM and POS networks, manned teller systems, telephone banking, mobile commerce, and Internet bankingand commerce. ACI (www.aciworldwide.com) develops and markets many BASE24 based applications like BASE24-ATM, BASE24-CARD, BASE24-BILLPAY, BASE24-TELLER, etc.

(7) How do you determine the RAM on a Tandem machine?Type the following at the tacl prompt :> peek /cpu 0/ paging Here's a sample output :PEEK - T9050G09 - (04APR01) SYSTEM \WHIT10COPYRIGHT TANDEM COMPUTERS INCORPORATED 1981, 1985, 1988, 1990

SYSTEM \WHIT1022 SEP 2001, 18:20___ELAPSD 32:11:07___CPU 0(NSR-W)

PAGES: PHYSCL SWAPBL FREE FREEMIN FREEQUOTA FREERED LOCKED LOCKED(KSEG0)(16Kb) 16384 16164 867 10 10 5 7372/14144 7372/28480

FAULTS ALLOCS DISKREADS DISKWRITES MUTEXCRAX NONMUTEXCRAXTOTAL 90718 101394 46526 1810 21017 649046(per sec) 0.78 0.87 0.40 0.01 0.18 5.60

REDHIT REDBUSY REDTASKTOTAL 0 0 0(per sec) 0.00 0.00 0.00

CLEANQ: FULLS FRLST:HITS CLOCK:CALLS FAILS CYCLES ALIASES: FAILS0 0 100202 2745 0 3.58 0 0

This will give you the amount of RAM for CPU 0 :PAGES * PHYSCL = (16kb) * 16384= 256 MB (rounded)

(8) How do I know the full Guardian filename of a file under OSS?Use "GNAME <filename>" on the OSS prompt.

(9) How do you run TACL commands from OSS and vice-versa?As the kernel is same for both OSS and Guardian, there is an option of executing TACL commands on the OSS prompt and the other way round. This is the syntax of running TACL commands on OSS : gtacl -c " < tacl cmd > "E.g. gtacl -c "fup copy taclcstm"

Here's the way of running OSS commands on TACL prompt :

OSH -c " < OSS CMD > "

E.g. If you want to see the contents of a file, you can try this : osh -c "more taclcstm"

(10) What is RISC and CISC?

RISC: Reduced Instruction Set Computing.

CISC: Complex Instruction Set Computing.

TNS C Languages system made up cprep, C compiler, C runtime library, BinderC Prep is embedded in C compiler running in Guardian environment, but in OSS environmentYou must run it separately using c89 utility.

TNS/R Native mode: The operational environment in which native-compiledRISC code executes.

NMC: You have to use -L to search library instead of SEARCH pragma, use -I instead of SSV. NMC produces non-executable object. Combine several modules by nld to get the executableobject. You can combine several files in one file and then use LINKFILE to link them.e.g.

Page 19: Help File for HP TANDEM

NMC/ in mod1c/ fileo; RUNNABLE, LINKFILE "myfile" Here myfile contains the names of object files like file1, file2, file3 etc.

CRTLMAIN: contains initialize code for c, c++ libraries.SRL: shared runtime libraries. (Code in virtual memory).-OBEY $SYSTEM.SYSTEM.LIBCOBEY is sufficient to link the SRLs used by c program.

nld: NATIVE LINK EDITOR:nld is same as binder in TNS mode. nld is used in NATIVE mode. Unlike bindernld cannot replace individual procedures and data blocks in an object fileor build object file from individual procedures and data blocks. nldoperates on procedures and data blocks but in terms of an entire object file.

noft: NATIVE OBJECT FILE UTILITY:It is used to,Determine the optimization level of procsDisplay object code with source codeList object file attributesList unresolved references Converting C-series C programs to D-series:

1. Replace LARGEC, SMALLC, WIDEC with CLARGE, CSMALL, CWIDE.2. Replace min & max macro with _min & _max macros.3. Replace cc_status with _cc_status. lowmem with _lowmem., tal with _tal. Before D-Series, you had to bind the memory-model independent C runtime library(CLIB) into your application. In D series CLIB and CRELIB are part of system library.

GUARDIAN Help:

AWAITO[X]:This call is used to complete previously initiated i/o.you can use AWAITOX instead of AWAITO , segement id is -1 here.buffer-address contains extended address. But if user use accidentallyAWAITO instead of X then error 2 is returned. If the address is in selectablesegment that segment must be in use.Attempting open disk file with nowait_depth more than 1 causes error 28. AWAITOX(filenum ! i,o ,buffer-addr !o ,count-transferred !o ,tag !o ,timelimit !o ,segmentid !o FILE_CREATE & FILE_CREATELIST:Some file chars like alternate key, format type, partition info cannot bespecified in 1st call that’s why use FILE_CREATELIST .

FILE_OPEN:Input to this is file name and output is filenumber.Filenumber is 0 is reserved for $RECEIVE.Direct i/o: file opened by file_open uses direct i/o transfer by default.To use intermediate buffer in PFS use SETMODE 72. OPEN call by default uses PFS.

HEADROOM_ENSURE:Allows u to check that current main stack or privileged stack has enough space ret-val := HEADROOM_ENSURE(room); ret-val INT(32) returns Number of bytes between current stack pointer & stack limit if room <= 0D. It returns outcome of operation if room > 0D

KEYPOSITION[X]:To position file by primary or alternate key in structed file.Generally POSITION call is used in case of realtive and entry-sequenced filewhile KEYPOSITION is used in case of key-sequenced file.0: approximate, 1: generic, 2:exactError 22 :0022 The application parameter or buffer address is out of bounds.is returned if KEPOSITIONX address is extended, and segement is not in use. address is not absoulte and user is not privileged.

MOVEX:Used to move data between extended segments.Error 24: segement is privileged, but user not.

NUMIN: Converts ASCII value into signed NUMBERNUMOUT: Converts unsigned NUMBER into ASCII value.

READ:return data from open file to application buffer.SEGEMENT_ALLOCATE:allocates extended segment for use by application process.Extensible segment is one for which swap file disk space is not allocateduntil it is needed. READUPDATE[X]

Page 20: Help File for HP TANDEM

if KEPOSITION call is there before READUPDATEX then it must be exact otherwiseREADUPDATEX fails.gives error 46 invalid key. To avoid this make intermediate call to READ.If $RECEIVE is opened with receive-depth 0 only READX is allowed.READUPDATEX gives error 2, invalid operation. receivedepth is maximum numberof messages that the application process expects to read before correspondingreply is made. GUARDIAN PROGRMMING MANUAL:Fault-Tolerance:-TMF-Process pairs-Persistent process: process that supplies services to other processes but otherwise maintain no data of their own. Security:O : owner on local nodeU : owner on local & remote nodeG : group user on local nodeC : group user on local & remote node- : super id on localA : all on local nodeN : all on local & remote node(n/w).

G-Series Highlights and Migration Planning Guide426088-0011-3

The Advantages of Migrating to a G-Series Release The following is a brief summary of some of the features and capabilities you gain by migrating from a D-series release to a G-series release:

1. Scheduled down time decreases; almost all system configuration can be performed online.2. A new SYSnn subvolume is created only when you install a new software release. Therefore, less disk space is required on $SYSTEM for system configuration information.3. More memory per processor is available for NonStop™ Himalaya S-series servers. On NonStop™ Himalaya K-series servers, 256 megabytes per processor is the maximum.4. Graphical user interfaces (GUIs) are available.5. The Compaq Tandem Service Management (TSM) package provides logical views and physical views of a system’s configuration through a GUI.6. Each system console can manage up to ten servers. Only one server can be managed by each system console on NonStop™ Himalaya K-series systems.7. You must migrate to a G-series release to take advantage of the ServerNet architecture on the NonStop™ Himalaya S-series server.

The ServerNet architecture offers the following features:

1. Faster disk access. NonStop™ Himalaya S-series systems need less disk capacity to achieve the same performance as NonStop™ Himalaya K-series systems.2. Better data transfer performance. A ServerNet SAN allows simultaneous bi-directional data transfer, whereas inter-processor bus communications do not.3. On an inter-processor bus, the destination address is sent and then the data is sent after the proper response is received. A ServerNet SAN is optimized for data transfer and

handshaking, because it sends the data and the destination address at the same time.4. More reliable data transfer. On an interprocessor bus, the data is not checked until it is received. On a ServerNet system area network (SAN), a packet of information is checked

at various points on the network as it is being transmitted; thus, errors are easily detected and corrected.5. Faster data transfer. The ServerNet architecture uses adapters with ServerNet addressable controllers (SACs) instead of separate I/O controllers. ServerNet adapters and SACs

require less processing than I/O controllers, which makes data transfer faster.

Tandem NonStop TCP/IP

Transmission Control Protocol/Internet Protocol (TCP/IP) Tandem TCP/IP subsystem allows communications to take place between heterogeneous systems in multi-network environment (Internet), and provides for the integration of UNIX systemswith Tandem systems.TCP/IP subsystem also includes an X.25 interface and Logical Link Control (LLC) interface. Type of Service: Depending on the type of communications service required, your application uses one or more of the following protocols:

TCP (Transmission Control Protocol): Provides reliable end-to-end data transfer. TCP is stream-oriented protocol with no concept of boundaries. This protocol guarantees that all data

sent is received and arrives in the same order in which it was sent.

UDP (User Datagram Protocol): provides unreliable datagram service. The integrity of the packets sent is maintained; when a packet is received, it matches exactly what was sent.

However, neither the delivery of the datagrams nor the order in which the datagrams are received is guaranteed.

IP (Internet Protocol): Allows data to be transferred between heterogeneous networks. It also services host to host protocols. The IP provides a number of capabilities at the network

level and is the foundation of Tandem TCP/IP subsystem. The TCP and UDP protocols use the IP protocol.

Layering Networking protocols are normally developed in layers, with each layer responsible for a different facet of the communications. TCP/IP is a combination of different protocols at various layers.

OSI Service Layers/ 7-Layer ModelApplication, Presentation, Session, Transport, Network, Link, Physical

TCP/IP is normally considered to be a 4-layer system.

Application (Telnet, FTP, SMTP, e-mail, etc)

Transport (TCP, UDP)

Network (IP, ICMP, IGMP)

Link (device driver and interface card)

1. Link layer, sometimes called the data-link or network interface layer, normally includes the device drivers in the operating system and the corresponding n/w interface card in the

computer.

Page 21: Help File for HP TANDEM

2. Network Layer, sometimes called internet layer handles the movements of packets around the network.

3. Transport layer provides the flow of data between two hosts, for the application layer above.

4. Application layer handles the details of the particular application.

Socket Library Routines A socket is an end point for communication. An application process calls a socket routine to request that the Tandem TCP/IP software create a socket when needed and specify the type ofservice desired. Applications can request TCP and UDP sockets as well as raw sockets for direct access to IP.After creating a socket, the application optionally binds the socket to a specific local address and port, and sends or receives data on the socket. When the transfer is complete, applicationcan shut down the socket and close it.

Internet Addresses

The combination of Internet Protocol (IP) address and a port number uniquely identifies a socket.Because a host can be connected to more than one network, each host can have more than one IP address. Each physical device, or interface, that adds the host to a new, logical networkhas its own IP address. An IP address is a 4-octal (32-bit) numeric value identifying a particular network and a local host on that network. (e.g. 133.50.85.43). Each octet value is a number in 0-255 An IP address is sometimes represented externally as two numbers separated by a period. In this case the first number is the network address and the second is the local address. Theinterpretation of such addresses in octets depends on the class of the IP address- Class A,B,C. Class of the IP address determines how the 32 bits are divided between the network addressand the local address.0-31 bits, bit 0 and 1 used to specify Class.

xx Octet-1(bits 2-7) Octet-2 Octet-3 Octet-4

xx= 00: Class A – 1-octet n/w and 3-octet local address.xx= 10: Class B – 2-octet n/w and 2-octet local address.xx= 11: Class C – 3-octet n/w and 1-octet local address. The host address can be split into subnets. To address subnets within a local area network, your LAN administrator can further divide the local address part of your IP addresses into asubnet number (identifying the particular subnet) and a host number (identifying the host system within the subnet.The subnet number is always in the most significant n bits of the local address, the LAN administrator will decide the value of n based on the number of subnets needed and the number ofhosts per subnet. To identify the part of the IP address that represents the subnet number, a subnet mask is used. This is 32-bit mask with all bits corresponding to the network address and subnet addressis set to 1, and with all bits corresponding to remainder of the local address set to 0. e.g. Class B address shown below: Network address (bit 0-15) Subnet

Number (16-20)Host number (21 to 31)

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0

Port Numbers

Both TCP and UDP use a 16-bit port number to select a socket on the host.Client programs normally use more or less random port numbers; however, specific port numbers called well-known ports are assigned for use by server programs. (e.g. FTP- ports 20/21,Telnet – port 23, HTTP – Port 80) 0-512: Well known ports512-1024:>1024: Ephemered (Short Lived)

TCP/IP Basic Steps

Client program [Function call] Server program [Function call]

1 Designate the TCP/IP process name (optional)[call function: socket_set_inet_name] Designate the TCP/IP process name (optional)2 Create a socket [call function: socket] Create a socket3 Bind the socket to any port (optional; not done in IP)

[function: bind]Bind the socket to a well-known port (required for most servers;does not apply to IP; optional for servers started by theLISTNER process)

4 Connect the socket (required for TCP; optional for UDP or IP) [connect] Listen for connections (required for TCP; not done for UDP orIP)[listen]

5 Accept incoming connections. When connection is received,create a new socket and accept the connection on the socket (required for TCP; optional for UDP; not done for IP)[accept]

6 Start data transfer[send and recv],[sendto and recvfrom – uses the remote address and port number passed as argument, used with connectionless protocols (UDP and IP)

Start data transfer (use the new socket created in the laststep)

7 Shut down the socket (optional for TCP; not done for UDP or IP)[shutdown]

Shut down the socket (optional for TCP; not done for UDP or IP

8 Close the socket [CLOSE] Close the socket

Ads by Google

Native American IndianJew elry, Art, Dance & Pottery. See

Southwestern Art in Albuquerque NM!Arts-Culture.ItsaTrip.org

Military Records OnlineEvery soldier has a story. Search military

records for your ancestorsAncestry .ca

Portraits Rick Jacobsonlarge or small oil portraits on canvaswww.rickjacobsonpaints.com