beautypg.com

Figure 8-4, Key-sequenced file format – HP NonStop G-Series User Manual

Page 132

background image

Using FUP for Advanced File Management

Guardian User’s Guide 425266-001

8- 10

File-Creation Examples

To create a file for records in the key-sequenced format, enter the following FUP
commands in a disk file, and then start a FUP process that takes input from this file.
This example shows the commands in FILE1.

Figure 8-4. Key-Sequenced File Format

20> TEDIT FILE1
VOLUME $VOL1.SVOL -- Set the default volume and
-- subvolume to the desired values.
SET TYPE K -- Set file type as key-sequenced.
SET CODE 1000 -- You can optionally specify a file
-- code to identify the file.
SET EXT (16, 1) -- Set primary and secondary
-- extent sizes for the application.
SET REC 150 -- Set record length and block size.
SET BLOCK 2048
SET COMPRESS -- If desired, you can specify data
-- and index compression.
SET KEYLEN 34 -- You must specify a primary-key
-- length for key-sequenced files.
SET IBLOCK 2048 -- You can also specify the size of
-- index blocks.
SHOW -- Display current parameter values.
CREATE KEYSEQ -- Create the file.

21 > FUP /IN FILE1/

004

CDT

.CDD

[0]

[34]

[134]

[142]

[150]

Byte

Offset

Primary

Key

name

address

phone

affi

l

This manual is related to the following products: