Menu principal                 [Fechar]


CICS Manual do Usuário - SET FILE CLOSED


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 CLOSED

Closes a file.

Sintaxe:

SET FILE CLOSED
 
                                            .-WAIT-------.
>>-SET FILE(data-value)--CLOSED--+-------+--+------------+-----><
                                 '-EMPTY-'  +-+--------+-+
                                            | '-NOWAIT-' |
                                            '-+-------+--'
                                              '-FORCE-'
 
 

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

Note:
DSIDERR is equivalent to FILENOTFOUND.

Descrição:

SET FILE CLOSED allows you to close a local file.
The WAIT and NOWAIT options provide synchronous and asynchronous operations respectively.

Opções:

    EMPTY
  • Specifies that the data that is in the file is no longer required. CICS responds to this command by setting the EmptyOpt flag, which requests that the file be emptied when it is next opened in the CICS runtime database.
  • CICS queue and file control permits the file to be emptied only if exclusive access to the file is obtained.
  • If not, CICS does not open the file. It is possible to fail to gain exclusive access because CICS queue and file control allows multiple regions and batch processes to access files.
    FILE(name)
  • Specifies the name of the file as it is defined in the File Definitions (FD).
  • The name can be up to eight characters long.
    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.
  • Note:
    • Using the FORCE option to close a file can cause immediate termination of user's 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.
    NOWAIT
  • This options acts in the same way as the WAIT option does, except that CICS returns control to the application when the SET FILE CLOSED request has been queued.
    WAIT
  • Specifies that CICS is to wait until all activity on the file has quiesced before setting the file CLOSED, and finally returning control to the application.
  • The WAIT option is the default.

Condições:

    FILENOTFOUND
  • Occurs if the named file cannot be found in the FD (RESP2=18).
  • Ação pré-definida: Terminates the task abnormally.
    INVREQ
  • Occurs for the following conditions, depending on the options that are specified on the SET FILE CLOSED command:
    • The file is remote (RESP2=1).
    • The file is in use within the current LUW (RESP2=21).
  • Ação pré-definida: Terminates the task abnormally.
    IOERR
  • Occurs if the SET FILE CLOSED operation fails. The CICS queue and file control return code, if any, is set in RESP2.
  • See Processing the IOERR condition for information about handling the IOERR condition.
  • Ação pré-definida: Terminates the task abnormally.
    NOTAUTH
  • Occurs if a resource security check has failed on FILE(name).
  • Ação pré-definida: Terminates the task abnormally.

Informações relacionadas:


© Copyright IBM Corp.