Menu principal                 [Fechar]


CICS Manual do Usuário - SET FILE


Volta a página anterior

Volta ao Menu Principal


Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

SET FILE

Changes attributes of a file.

Sintaxe:

SET FILE
 
>>-SET FILE(data-value)--+------------+------------------------->
                         +-ADD(cvda)--+
                         +-ADDABLE----+
                         '-NOTADDABLE-'
 
                                               .-WAIT-------.
>--+----------------------+--+--------------+--+------------+--->
   '-BASENAME(data-value)-'  +-BROWSE(cvda)-+  +-BUSY(cvda)-+
                             +-BROWSABLE----+  +-FORCE------+
                             '-NOTBROWSABLE-'  '-NOWAIT-----'
 
>--+--------------+--+-------------------+---------------------->
   +-DELETE(cvda)-+  +-DISPOSITION(cvda)-+
   +-DELETABLE----+  +-OLD---------------+
   '-NOTDELETABLE-'  '-SHARE-------------'
 
>--+--------------------+--+-------+--+-------------------+----->
   '-DSNAME(data-value)-'  '-EMPTY-'  +-EMPTYSTATUS(cvda)-+
                                      +-EMPTYREQ----------+
                                      '-NOEMPTYREQ--------'
 
>--+--------------------+--+-----------------+------------------>
   +-ENABLESTATUS(cvda)-+  +-EXCLUSIVE(cvda)-+
   +-DISABLED-----------+  +-EXCTL-----------+
   '-ENABLED------------'  '-NOEXCTL---------'
 
>--+------------------+--+------------------------+------------->
   '-FILE(data-value)-'  '-FILESERVER(data-value)-'
 
>--+-----------------------+--+-----------------------+--------->
   '-INDEXNAME(data-value)-'  '-LSRPOOLID(data-value)-'
 
>--+------------------------+--+------------------+------------->
   '-MAXNUMRECS(data-value)-'  +-OPENSTATUS(cvda)-+
                               +-CLOSED-----------+
                               '-OPEN-------------'
 
>--+-------------+--+---------------------+--+-------------+---->
   +-READ(cvda)--+  '-STRINGS(data-value)-'  +-TABLE(cvda)-+
   +-NOTREADABLE-+                           +-NOTTABLE----+
   '-READABLE----'                           +-CICSTABLE---+
                                             '-USERTABLE---'
 
>--+--------------+--------------------------------------------><
   +-UPDATE(cvda)-+
   +-NOTUPDATABLE-+
   '-UPDATABLE----'
 
 

Condições: FILENOTFOUND, INVREQ, IOERR, NOTAUTH

For more information about the use of CICS-value data areas (CVDAs), see Appendix F, CVDAs recognized by the translator.

Any combination of the options can be set on one command.
All changes, other than to close and disable the file, require that the file be in a CLOSED state, with an ENABLESTATUS of either DISABLED or UNENABLED, and they do not take effect until the file is next opened.

The requested changes are applied in the following sequence:
NOEMPTYREQ, CLOSED, DISABLED, miscellaneous, OPEN, ENABLED.

The commands that allow you to enable, disable, open, and close a file are described separately.
Those commands are:

Descrição:

The SET FILE command allows you to change some of the attributes of a named file.

Opções:

    ADD(cvda)
  • Specifies whether new records are able to be added to the file.
  • The CVDA values are:
    • ADDABLE
      • New records are to be added to the file.
    • NOTADDABLE
      • New records are not to be added to the file.
    BASENAME(data-value)
  • Specifies part of the file name. The name can be up to 32 characters long.
  • The actual name of the file is formed by concatenating the value in the FILESERVER option with the value in the BASENAME option.
    BROWSE(cvda)
  • Specifies whether the file can be browsed.
  • The CVDA values are:
    • BROWSABLE
      • The file is browsable.
    • NOTBROWSABLE
      • The file is not browsable.
    BUSY(cvda)
  • Specifies what CICS is to do if the file is in use when you issue the SET command.
  • The BUSY option is valid only for requests to SET the file DISABLED or CLOSED, and is ignored for any other request.
  • The CVDA values are:
    • FORCE
      • All tasks that are using the file are abended, the file is immediately DISABLED or CLOSED, and control returns to the issuing application.
      • It is recommended that the use of the FORCE option be restricted to exceptional conditions.
      • Data integrity is not guaranteed when the FORCE option is used, and depending on what tasks are currently processing, it is possible for CICS to terminate abnormally.
    • NOWAIT
      • This option acts in the same way as does the WAIT option, except that CICS returns control to the issuing application when the SET request has been queued.
    • WAIT
      • CICS is to wait until all activity on the file has quiesced before setting the file to DISABLED or CLOSED.
      • CICS then returns control to the application that is issuing this command. WAIT is the default.
  • Note:
    • Using the FORCE option to close a file can cause immediate termination of users' tasks to occur through the CICS task FORCEPURGE mechanism.
    • Data integrity is not guaranteed with this mechanism. In some extreme cases, for example, if an error occurs during backout processing, CICS can terminate abnormally.
    • For this reason, restrict file closing through the use the FORCE option to exceptional circumstances.
    DELETE(cvda)
  • Specifies whether records can be deleted from the file.
  • The CVDA values are:
    • DELETABLE
      • Records are able to be deleted from the file.
    • NOTDELETABLE
      • Records are not able to be deleted from the file.
    DISPOSITION(cvda)
  • Specifies the disposition for this file. When you issue a SET FILE DISPOSITION command, you override the current DISPOSITION value.
  • The CVDA values are:
    • OLD
      • The disposition value is to be OLD.
    • SHARE
      • The disposition value is to be SHARE.
  • TXSeries for Multiplatforms checks this option only for validity; otherwise, it ignores this option.
    DSNAME(data-value)
  • Specifies the name, as it is defined to the access method and the operating system, of the data set that is associated with this file.
  • The name can be up to 44 characters long.
  • TXSeries for Multiplatforms checks this option only for validity; otherwise, it ignores this option.
  • Note:
    • For TXSeries for Multiplatforms, the value that is set for DSNAME is mapped to the BASENAME attribute.
    • Although it is possible to enter a 44-character name, when the value is mapped to the BASENAME attribute, it is truncated to accommodate the 32-character length that is allotted for the BASENAME attribute.
    EMPTY
  • This option is equivalent to EXEC CICS SET FILE EMPTYSTATUS(EMPTYREQ). It is supported only for compatibility reasons.
    EMPTYSTATUS(cvda)
  • Specifies whether the data set is to be emptied when a file that references it is next opened.
  • The CVDA values are:
    • EMPTYREQ
      • The file is to be opened empty, or created if it does not exist.
    • NOEMPTYREQ
      • The file is not to be opened empty.
    ENABLESTATUS(cvda)
  • Specifies whether application programs can access the file.
  • The CVDA values are:
    • DISABLED
      • The file is NOT available for access by application programs.
    • ENABLED
      • The file is available for access by application programs.
    EXCLUSIVE(cvda)
  • Specifies whether records that are on this file are to be placed under exclusive control when a request to read for update is issued.
  • The CVDA values are:
    • EXCTL
      • Records that are on this file are to be under exclusive control.
    • NOEXCTL
      • Records that are on this file are not to be under exclusive control.
  • TXSeries for Multiplatforms checks this option only for validity; otherwise, it ignores the option.
    FILE(data-value)
  • Specifies the eight-character file name that is defined in the File Definition (FD) stanza entry.
    FILESERVER(data-value)
  • Specifies part of the name of the Structured File Server (SFS) server in which this record resides.
  • The name can be up to 32 characters long.
  • The actual name of the file is formed by concatenating the value that is in the FILESERVER option with the value that is in the BASENAME option.
    INDEXNAME(data-value)
  • Specifies the name of the index that is associated with the path to this file.
  • The name can be up to 32 characters long.
  • The value that is specified for the INDEXNAME option overrides the value that is specified in the File Definition (FD) stanza entry for this file.
    LSRPOOLID(data-value)
  • Specifies, as a 32-bit binary value, the number of the LSR pool that is associated with this file.
  • It must be in the range 1 through 8.
  • TXSeries for Multiplatforms checks this option only for validity; otherwise, it ignores this option.
    MAXNUMRECS(data-value)
  • Specifies, as a 32-bit binary value, the maximum number of records that the data table for this file can hold.
  • The value you specify can be in the range 16 through 16777215 (16 MB-1).
  • TXSeries for Multiplatforms checks this option only for validity; otherwise, it ignores this option.
    OPENSTATUS(cvda)
  • Specifies whether the file is to be open or closed.
  • The CVDA values are:
    • CLOSED
      • The file is to be closed on all CICS processes.
      • If the WAIT option is also specified, (or allowed to default), the issuing transaction remains in a waiting state until all processes report that they have closed the file.
    • OPEN
      • The file is to be opened.
  • If a recoverable data set is to be closed, the task must commit or back out any earlier changes to that data set; otherwise, the request is rejected by file control.
    READ(cvda)
  • Specifies whether records can be read from the file.
  • The CVDA values are:
    • NOTREADABLE
      • Records are not to be readable from the file.
    • READABLE
      • Records are to be readable from the file.
    STRINGS(data-value)
  • Specifies, as a 32-bit binary value, the maximum number of concurrent operations to allow on this file, in the range 1 through 255.
  • TXSeries for Multiplatforms checks this option only for validity; otherwise, it ignores this option.
    TABLE(cvda)
  • Specifies whether the file name that is specified on the FILE parameter represents a data table.
  • The CVDA values are:
    • CICSTABLE
      • The file name represents a CICS-maintained data table.
    • NOTTABLE
      • The file name does not represent a data table.
    • USERTABLE
      • The file name represents a user-maintained data table.
  • TXSeries for Multiplatforms checks this option only for validity; otherwise, it ignores this option.
    UPDATE(cvda)
  • Specifies the type of file access permissions that are set on the file.
  • The CVDA values are:
    • NOTUPDATABLE
      • You can only read the records.
    • UPDATABLE
      • You can read, write, or delete the records.

Condições:

    FILENOTFOUND
  • RESP2 values:
    • The named file cannot be found (RESP2=18).
    INVREQ
  • RESP2 values:
    • The named file is REMOTE (RESP2=1).
    • The named file is not CLOSED (RESP2=2).
    • The named file is not DISABLED (RESP2=3).
    • ADD has an invalid CVDA value (RESP2=4).
    • BROWSE has an invalid CVDA value (RESP2=5).
    • BUSY has an invalid CVDA value (RESP2=6).
    • DELETE has an invalid CVDA value (RESP2=7).
    • DISPOSITION has an invalid CVDA value (RESP2=8).
    • EMPTYSTATUS has an invalid CVDA value (RESP2=9).
    • LSRPOOLID is not in the range 1through 8 (RESP2=11).
    • READ has an invalid CVDA value (RESP2=12).
    • STRINGS value is not in the range 1 through 255 (RESP2=13).
    • UPDATE has an invalid CVDA value (RESP2=14).
    • OPEN was requested, but the data set has had a backout failure (RESP2=15).
    • OPENSTATUS has an invalid CVDA value (RESP2=16).
    • ENABLESTATUS has an invalid CVDA value (RESP2=17).
    • The file is in use within the current LUW (RESP2=21).
    • ENABLED was specified for a file that is currently DISABLING or UNENABLING (RESP2=22).
    • EXCLUSIVE has an invalid CVDA value (RESP2=23).
    • TABLE has an invalid CVDA value (RESP2=29).
    • MAXNUMRECS value is out of range (RESP2=30).
    IOERR
  • RESP2 values:
    • OPEN has failed in the CICS file manager, and the RESP2 field contains a CICS file manager response code.
    • CLOSE has failed in the CICS file manager, and the RESP2 field contains a CICS file manager response code.
    NOTAUTH
  • RESP2 values:
    • CLOSED or DISABLED has been specified for a system file that is required by CICS (RESP2=101).

Exemplos:

         EXEC CICS SET FILE ('FILE12')
              WAIT
              CLOSED
              DISABLED
         END-EXEC

         EXEC CICS SET FILE ('FILE12')
              OPEN
              ENABLED
         END-EXEC
  • On the first command, the WAIT option tells CICS to allow all activity on FILE12 to quiesce before closing the file, and it also indicates that the return of control to the issuing application is to occur only when this request has been queued.
  • When the file has been CLOSED, it is to be DISABLED.
  • The second of the two commands opens FILE12, and the third command enables the file.


© Copyright IBM Corp.