database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
PostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
ㆍCache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
Cache Q&A 1069 게시물 읽기
No. 1069
파일 Open 모드 파라미터
작성자
CacheDB
작성일
2010-03-09 15:59
조회수
15,694

Cache 루틴에서 입출력을 위해 File을 열 때 사용하는 여러가지 모드를 모아 보았다. 현재 2009.1 버전 기준.

참고로,  이 자료는 InterSystms DB 문서에서 "OPEN Mode Parameters" 라는 키워드로 찾으면 나온다.
http://docs.intersystems.com/cache20091/csp/docbook/DocBook.UI.Page.cls?KEY=GIOD_rmsseqfiles#GIOD_rmsseqfiles_openmodeparams 

 

OPEN Mode Parameters
Letter Code Keyword Description
N /NEW
New file. If the specified file does not exist, Caché creates the file. If the specified file already exists, Caché creates a new one with the same name. The status of the old file depends on which operating system you are using. On UNIX and Windows, Caché deletes the old file. (Note that file locking should be used to prevent two concurrent processes using this parameter from overwriting the same file.) On OpenVMS, Caché supersedes the old file with a new file with a higher version number; the old file is not deleted.
If the “N” option is not specified and the file specified in OPEN does not exist, the Windows and UNIX default is to not create a new file; the OpenVMS default is to create a new file. This behavior is configurable using the $ZUTIL(68,3) and $ZUTIL(69,3) functions.
E
/CREATE
/CRE
(UNIX) Create a file if it does not exist. Does not delete and recreate an existing file, as the N mode does. The default is to not create a new file. This default is overridden if $ZUTIL(68,3) or $ZUTIL(69,3) is enabled.
D
/DELETE[=n]
/DEL[=n]
Delete File: Specifies that the file should be automatically deleted when it is closed. /DELETE or /DELETE=n for nonzero values of n enable the parameter code. /DELETE=n for a zero value of n disables the parameter code. The default is to not delete a file.
R /READ Read: Caché permits READ access the file. Other processes may also access this file (however, see “L” parameter). If you attempt to open a nonexistent file in “R” mode, the process hangs. To prevent this situation, use a timeout. “R” is the default for Windows and UNIX. “RW” is the OpenVMS default. This system default is configurable using the $ZUTIL(69,2) function.
W
/WRITE
/WRI
Write: Caché permits WRITE access to the file. In Windows and UNIX, “W” gives the process shared write access to the file, with exclusive write access to the record. Use “WL” to specify exclusive write access to the file. In OpenVMS, “W” gives exclusive write access to the file. If you attempt to open a nonexistent file in “W” mode, the process hangs until the file is created or the process is resolved by a timeout, a Process Terminate, or RESJOB. “R” is the default for Windows and UNIX. “RW” is the OpenVMS default. This system default is configurable using the $ZUTIL(69,2) function.
L   Locked Exclusive: Use this option with the “W” (Write) option to specify exclusive write access to a file. “WL” or “WRL” specifies that the current process has exclusive write access to the file. A file opened with “RL” may still have shared read access. The effects of the “L” option on concurrent opens are different in Windows and UNIX. Refer to the “OPEN Mode Locking” section, below, for further details. On UNIX systems if one process specifies “WL” (or “WRL”) access to a file, other processes requesting read access to that file must specify “RL” so that UNIX can coordinate file locking. This option is not used by OpenVMS, and is ignored. OpenVMS opens a file in “W” mode for exclusive write access by default. To override this OpenVMS behavior, use the RMS file “H” (shared) mode parameter.
A
/APPEND
/APP
Append: WRITE operations append data to the end of an existing file. The default is to overwrite existing data, rather than append.
S /STREAM Stream format with carriage return, line feed, or form feed as default terminators. Jobbed processes that inherit TCP devices are automatically set to “S” format. You can reset the format with the USE command. S, V, F, and U modes are mutually exclusive. Stream record format is the default on non-OpenVMS systems. Variable length is the default on OpenVMS systems.
V /VARIABLE Variable length: Each WRITE creates one record. For Windows and UNIX, you specify the maximum record length in the reclen argument. OpenVMS automatically handles the record length during a WRITE. Do not attempt to insert records in a variable-length sequential file; a WRITE will render inaccessible all data in the file from the point after the WRITE on. S, V, F, and U modes are mutually exclusive. Stream record format is the default on non-OpenVMS systems. Variable length is the default on OpenVMS systems.
F
/FIXED
/FIX
Fixed length: Each record is the length specified in the reclen argument. All data written is packed into fixed-length records. For example:
OPEN "myfile":("NWF":4) USE "myfile" WRITE "ABC","DEF","GHI","JKL"
produces the following three records: ABCD EFGH IJKL. This works only for READ operations (not WRITE operations). S, V, F, and U modes are mutually exclusive. OpenVMS RMS files cannot use this option; use RMS “B” (block) mode instead.
U /UNDEFINED Undefined length: Specifies that file records have an undefined length and therefore READ operations must specify the number of characters to read. No translation on output. Default value is the maximum string length, currently 32,767 characters. S, V, F, and U modes are mutually exclusive.
K\name\
Knum
/TRANSLATE[=n]: /IOTABLE[=name]
/TRA[=n]: /IOT[=name]
I/O Translation Mode: When you use the “K” parameter for a device, I/O translation will occur for that device if translation has been enabled system-wide. You identify the previously defined table on which the translation is based by specifying the table's name. When using keywords you specify /TRANSLATE to enable I/O translation (n=1 to enable; n=0 to disable), and /IOTABLE=name to specify the translation table to use. The + and - options for turning protocols on and off are not available with the K protocol. (The older form Knum, where “num” represents the number of the slot the table is loaded in, is being phased out but is still supported. The system manager can display slot numbers in the %NLS utility in the selection window for each table type.) This parameter may be used with either the OPEN command or the USE command.
Y\name\
Ynum
/XYTABLE[=name]
/XYT[=name]
$X/$Y Action Mode: When you use the “Y” parameter for a device, the system uses the named $X/$Y Action Table. You identify the previously defined $X/$Y Action Table on which translation is based by specifying the table's name. $X/$Y action is always enabled. If “Y” is not specified and a system default $X/$Y is not defined, a built in $X/$Y action table is used. The + and - options for turning protocols on and off are not available with the Y protocol. (The older form Ynum, where “num” represents the number of the slot the table is loaded in, is being phased out but is still supported. The system manager can display slot numbers in the NLS utility in the selection window for each table type.) This parameter may be used with either the OPEN command or the USE command.
[Top]
No.
제목
작성자
작성일
조회
1078[웹,SQL] 게시판 페이지 단위로 자르는 쿼리문 [1]
웹개발자
2010-03-18
12102
1071[펌]Studio 영문 메뉴를 보고 싶을 때
차라리영문
2010-03-09
9978
1070[웹-Zen] fileUpload 샘플코드
앙상블
2010-03-09
10516
1069파일 Open 모드 파라미터
CacheDB
2010-03-09
15694
1068[웹-Zen] fileUpload 사용시 IE브라우저에 파일이름 [1]
IE시로
2010-02-19
10330
1066[SQL] Index 재생성하기 소스레벨 분석자료 [1]
글로벌직접액세스
2010-02-17
10364
1065[웹-CSP] 첨부파일 업로드 하는 법 [1]
CSP개발자
2010-02-17
10447
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.016초, 이곳 서비스는
	PostgreSQL v16.4로 자료를 관리합니다