Adding lines to a redirection file

You can add lines to the service name redirection file list by specifying the -t option.

When you use this option, snrfck displays the normal redirection file and prompts you to enter new lines consisting of “service,” “user,” “application,” and “assigned_service,” each separated by a tab character. The snrfck utility reads the lines, validates them, adds them to the output file, and displays the amended file.

For example, you use the preceding sample file and enter:

snrfck -itestfile -t -onewfile

where:

NoteIf you use -t without using -o, your additions are displayed but not saved.

You receive a file with instructions for adding lines, as shown in the Table 6-8:

Table 6-8: Redirection file with -t option

requested_service

user_id

application_name

assigned_service

1:

<tab>

root

ksh

svc_ksh

2:

db2

joe

isql

svc_db2a

3:

db2

jane

isql

svc_db2b

4:

db2

sonia

Omni

svc_db2c

5:

db2

ramon

Omni

svc_db2d

6:

db2

sven

*

svc_db2gen

7:

other

*

*

svc_other

The following is displayed:

Enter service name redirection file lines:
service<tab>user<tab>application<tab>assigned_service
end with '.' on line by itself
8:

Then, you add the following lines in response to the prompt (snrfck supplies the line numbers):

8: db2 rachel * svc_db2gen
9: .

The snrfck utility produces a new service name redirection file, as shown in Table 6-9:

Table 6-9: Redirection file with new line added

requested_service

user_id

application_name

assigned_service

1:

<tab>

root

ksh

svc_ksh

2:

db2

joe

isql

svc_db2a

3:

db2

jane

isql

svc_db2b

4:

db2

sonia

Omni

svc_db2c

5:

db2

ramon

Omni

svc_db2d

6:

db2

sven

*

svc_db2gen

7:

db2

rachel

*

svc_db2gen

8:

other

*

*

svc_other

The snrfck utility adds the new entry and sorts the file.