- 1 Getting started
- 2 Compile
- 3 Customize
- 4 Optimize
- 5 Debug
- 6 Non-standard extensions
- 7 System Routines
- 附录 A
- 附录 B
- 附录 E
- 附录 I
文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
I.3 File I/O
Environment name: COB_VARSEQ_FORMAT Parameter name: varseq_format Purpose: declare format used for variable length sequential files - different types and lengths precede each record - 'length' is the data length, does not include the prefix Type: 0 means 2 byte record length (big-endian) + 2 NULs 1 means 4 byte record length (big-endian) 2 means 4 byte record length (local machine int) 3 means 2 byte record length (big-endian) Default: 0 Example: VARSEQ_FORMAT 1 Environment name: COB_FILE_PATH Parameter name: file_path Purpose: define default location where data files are stored Type: file path directory Default: . (current directory) Example: FILE_PATH ${HOME}/mydata Environment name: COB_LS_FIXED Parameter name: ls_fixed Purpose: Defines if LINE SEQUENTIAL files should be fixed length (or variable, by removing trailing spaces) Alias: STRIP_TRAILING_SPACES (0 = yes) Type: boolean Default: false Note: This setting is most useful if you want to REWRITE those files. Example: LS_FIXED TRUE Environment name: COB_LS_VALIDATE Parameter name: ls_validate Purpose: Defines for LINE SEQUENTIAL files that the data should be validated as it is read (status 09) / written (status 71). Type: boolean Default: true (per COBOL 2022) Note: If active effectively disables COB_LS_NULLS. Example: LS_VALIDATE FALSE Environment name: COB_LS_NULLS Parameter name: ls_nulls Purpose: Defines for LINE SEQUENTIAL files what to do with data which is not DISPLAY type. This could happen if a LINE SEQUENTIAL record has BINARY/COMP data fields in it. Type: boolean Default: false Note: The TRUE setting will insert a null character x"00" before those values to escape them, and redo on read-in plus validating that they only occur after a null character. Decreases LINE SEQUENTIAL performance and prevents writing escape sequences or formatting within the data. Only checked if COB_LS_VALIDATE is disabled. Example: LS_NULL = TRUE Environment name: COB_LS_SPLIT Parameter name: ls_split Purpose: Defines for LINE SEQUENTIAL files what to do when a record is longer than the program handles. If 'ls_split=true' then the data is returned as multiple records with io status 06, otherwise the record is truncated, io status set to 04 and the file skips to the next LF. Type: boolean Default: true (per COBOL 2022) Example: LS_SPLIT = FALSE Environment name: COB_SYNC Parameter name: sync Purpose: Should the file be synced to disk after each write/update Type: boolean Default: false Example: SYNC: TRUE Environment name: COB_SORT_MEMORY Parameter name: sort_memory Purpose: Defines how much RAM to assign for sorting data if this size is exceeded the SORT will be done on disk instead of memory Type: size but must be more than 1M Default: 128M Example: SORT_MEMORY 64M Environment name: COB_SORT_CHUNK Parameter name: sort_chunk Purpose: Defines how much RAM to assign for sorting data in chunks Type: size but must be within 128K and 16M Default: 256K Example: SORT_CHUNK 1M Environment name: COB_SEQ_CONCAT_NAME Parameter name: seq_concat_name Purpose: Does DD_asgname hold multiple input file names Type: boolean Default: false Example: seq_concat_name = true Environment name: COB_SEQ_CONCAT_SEP Parameter name: seq_concat_sep Purpose: Character separating file names Type: char Default: + Example: seq_concat_name = '&'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论