返回介绍

I.3 File I/O

发布于 2023-07-03 22:07:03 字数 4341 浏览 0 评论 0 收藏 0

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文