Validate Service Name Redirection File Format Using Basic Command

The snrfck basic command requires only the -i option to read the redirection file, validate each line, and flag the first incorrect line it encounters.

For example, suppose you enter:
snrfck -ic:\cfg\testfile
where:
Note: The path cfg\testfile is shown as a PC-based system in the examples.

Next, assume the redirection file contains duplicate entries.

Example of a Redirection File with a Duplicate Entry

requested_service

user_id

application_ name

assigned_service

AS400

Bob

isql

as1

AS400

*

isql

as2

AS400

Bob

isql

as2

AS400

*

Omni

omniA

AS400

*

Power Builder

powerB

DB2

*

Omni

db2omni

DB2

*

*

db2gen

<tab>

*

*

as2

In this example, snrfck returns:
c:\cfg\testfile: line3: duplicate/ambiguous row

If the file does not contain errors, the rows are sorted in the order used in the redirection operation and printed to the current window. The snrfck utility adds line numbers for clarity.

Example of a Correctly Formatted Redirection File

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