Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Example 2: Changing a default value

&pagelevel(4)&pagelevel

When a new file is created with the CREATE-FILE command, access to the file under other user IDs is prohibited by default (USER-ACCESS=OWNER-ONLY). In this case, however, for files created under the user ID EXAMPLE, the default value is to be changed so that access from other user IDs is possible.

This can be achieved by creating a user syntax file for the user ID EXAMPLE, in which the CREATE-FILE command is modified accordingly.

Note

Default values can be very flexibly (i.e. without modifying syntax files) defined as taskspecific default values. Task-specific default values are only evaluated when entered in the interactive dialog, however. In the following example, the default value could also have been defined as a task-specific default value:

/!create-file user-access=*all-users

See the "Introductory Guide to the SDF Dialog Interface’ manual [1 (Related publications)] for more detailed information on task-specific default values.

/set-logon-parameters example,... ————————————————————————————————  (1)
 .
 .
/create-file demo.1 ——————————————————————————————————————————————  (2)
/show-f-attr demo.1,inf=*par(security=*yes) ——————————————————————  (3)
%0000000003 :2OSG:$EXAMPLE.DEMO.1

%  -------------------------- SECURITY     ----------------------------
%  READ-PASS  = NONE        WRITE-PASS = NONE        EXEC-PASS  = NONE
%  USER-ACC   = OWNER-ONLY  ACCESS     = WRITE       ACL        = NO
%  AUDIT      = NONE        FREE-DEL-D = *NONE       EXPIR-DATE = NONE
%  DESTROY    = NO         FREE-DEL-T = *NONE       EXPIR-TIME = NONE
%  SP-REL-LOCK= NO
%:2OSG: PUBLIC:     1 FILE  RES=        3 FRE=       3 REL=       3 PAGES
 .
 .
/start-sdf-a —————————————————————————————————————————————————————  (4)
%  BLS0517 MODULE 'SDAMAIN' LOADED
%  SDA0001 'SDF-A' VERSION '04.1E10' STARTED
//open-syntax-file sdf.user.syntax,,*crea ————————————————————————  (5)

(1)

A task is initiated under the user ID EXAMPLE.

(2)

Using the CREATE-FILE command, a catalog entry is created for the file DEMO.1.

(3)

The protection attributes of the file DEMO.1 are displayed. It is not shareable
(USER-ACC = OWNER-ONLY).

(4)

SDF-A is loaded and started.

(5)The user syntax file SDF.USER.SYNTAX is opened as a new file to be created. Any user syntax file with this name cataloged under the user ID EXAMPLE is automatically activated for tasks of the user ID EXAMPLE when the LOGON command is processed. By default, the activated system syntax file and the activated group syntax file are assigned as reference files. The command definitions appearing in the reference files may be modified in the open user syntax file.

//show *oper(prot,orig=*com(create-file)),siz=*max ——————————  (6)
PROTECTION = *STD

     *STD or *PARAMETERS()
     Specifies the protection attributes of the file
     STRUCTURE: *PARAMETERS
          PROTECTION-ATTR = *BY-DEF-PROT-OR-STD
            .
            .
            .
          USER-ACCESS = *BY-PROTECTION-ATTR
              *BY-PROTECTION-ATTR or *OWNER-ONLY or *ALL-USERS or
               *SPECIAL
              Specifies whether external user IDs may access the file
          BASIC-ACL = *BY-PROTECTION-ATTR
            .
            .
            .
//edit *oper(prot,orig=*com(create-file)) ———————————————————  (7)
//mod-oper def='PARAMETERS' —————————————————————————————————  (8)
//edit *oper(user-acc) ——————————————————————————————————————  (9)
//mod-oper def='ALL-USERS' —————————————————————————————————— (10)

(6)

The PROTECTION operand of the CREATE-FILE command is displayed in its most detailed form.

(7)

The file is positioned to the PROTECTION operand of the CREATE-FILE command, i.e. this operand becomes the current object in the user syntax file being processed (SDF.USER.SYNTAX).

(8)

The operand that is the current object (PROTECTION) is to have the default value PARAMETERS. This change is necessary so that the subsequent modification (see steps 9 and 10) will work even when PARAMETERS, the value introducing the structure, is not explicitly specified. The value STD implicitly includes the specification USER-ACCESS=*BY-PROTECTION-ATTR (corresponding to USER-ACCESS= *OWNER-ONLY when no other default protection is defined with SECOS).

(9)

The file is positioned to the USER-ACCESS operand of the command currently being processed, CREATE-FILE, i.e. this operand becomes the current object in the open user syntax file (SDF.USER.SYNTAX).

(10)The operand that is the current object (USER-ACCESS) is to have ALL-USERS as its default value.

//show *oper(prot,orig=*com(create-file)),siz=*max ————————————— (11)
PROTECTION = *STD

     *STD or *PARAMETERS()
     Specifies the protection attributes of the file
     STRUCTURE: *PARAMETERS
          PROTECTION-ATTR = *BY-DEF-PROT-OR-STD
            .
            .
            .
          USER-ACCESS = *ALL-USERS
              *BY-PROTECTION-ATTR or *OWNER-ONLY or *ALL-USERS or
               *SPECIAL
              Specifies whether external user IDs may access the file
          BASIC-ACL = *BY-PROTECTION-ATTR
            .
            .
            .
//end
/mod-sdf-opt synt-file=*add(*std) —————————————————————————————— (12)
/create-file demo.2 ———————————————————————————————————————————— (13)
/show-f-attr demo.2,inf=*par(security=*yes) ———————————————————— (14)
%0000000003 :2OSG:$EXAMPLE.DEMO.2

%  ---------------------- SECURITY     -----------------------------
%  READ-PASS  = NONE        WRITE-PASS = NONE        EXEC-PASS  = NONE
%  USER-ACC   = OWNER-ONLY  ACCESS     = WRITE       ACL        = NO
%  AUDIT      = NONE        FREE-DEL-D = *NONE       EXPIR-DATE = NONE
%  DESTROY    = NO         FREE-DEL-T = *NONE       EXPIR-TIME = NONE
%  SP-REL-LOCK= NO
%:2OSG: PUBLIC:     1 FILE  RES=      3 FRE=       3 REL=       3 PAGES
 .
 .
/exit-job

(11)

The PROTECTION operand of the command currently being processed, CREATE-FILE, is displayed in its most detailed form.

(12)

The user syntax file $EXAMPLE.SDF.USER.SYNTAX is activated.

(13)

A user catalog entry for the file DEMO.2 is created with the CREATE-FILE command.

(14)

The protection attributes of the file DEMO.2 are displayed. It is shareable (USER-ACC = ALL-USERS).