COBOL Engine (dataspector.coboller)#
COBOL copybook parser, data decoder, and modern format converter.
Organized into four focused submodules:
dataspector.coboller.copybook—Copybook,GroupItem,ElementaryItem,ConditionName,ResolvedItem, andparse_copybook()dataspector.coboller.codecs— pure binary/text pack & unpack codecs (COMP-3,COMP-6,COMP/COMP-5/COMP-X,COMP-1/COMP-2IEEE & IBM HFP, zoned decimal, numeric-edited, external float,USAGE BIT)dataspector.coboller.parser— fixed-format & free-format COBOL line cleaning and clause parsingdataspector.coboller.constants—Usage,SignMode,DataCategory, compiled regexes, and lookup tables
References#
IBM Enterprise COBOL Language Reference — PICTURE & USAGE clauses: https://www.ibm.com/docs/en/cobol-zos/latest?topic=division-data-description-entry
IBM Enterprise COBOL — UTF-8 (
PIC U/BYTE-LENGTH) & National (PIC N): https://www.ibm.com/docs/en/cobol-zos/latest?topic=clause-usageIBM z/Architecture Hexadecimal Floating-Point (HFP): https://en.wikipedia.org/wiki/IBM_hexadecimal_floating-point
GnuCOBOL Programmer’s Guide (
COMP-6,COMP-X,BINARY-*,FLOAT-*,USAGE BIT): https://gnucobol.sourceforge.io/guides.htmlReading COBOL Layouts: http://www.3480-3590-data-conversion.com/article-reading-cobol-layouts-1.html
COBOL Code Format: https://en.wikipedia.org/wiki/COBOL#Code_format
Copybook & Record AST#
COBOL copybook AST classes (Copybook, GroupItem, ElementaryItem).
- class dataspector.coboller.copybook.ConditionName(name, raw_value, values=())[source]#
Bases:
objectLevel-88 condition-name attached to a COBOL data item.
- class dataspector.coboller.copybook.ResolvedItem(name, field, offset, byte_length, is_redefines=False)[source]#
Bases:
objectFlattened elementary item with exact byte offset and width in a record.
- Parameters:
name (str)
field (ElementaryItem)
offset (int)
byte_length (int)
is_redefines (bool)
- field: ElementaryItem#
- class dataspector.coboller.copybook.Copybook(copybook)[source]#
Bases:
objectCOBOL copybook parser, layout inspector, data reader, and format converter.
- Parameters:
- copybook
Path to a COBOL copybook file.
- Parameters:
copybook (str | pathlib.Path)
- records: list[GroupItem | ElementaryItem]#
- classmethod from_string(text, name='<string>')[source]#
Construct a
Copybookdirectly from raw copybook source text.
- property has_binary_fields: bool#
Trueif any item uses binary, packed, float, pointer, index, or wide storage.
- convert(datfile, output, chunksize=5000, encoding=None, float_format='ieee', byteorder='big', include_redefines=False, include_filler=False, line_ending='auto', dbcs_encoding='utf-16-be', decimal_comma=None)[source]#
Convert a fixed-width or compressed COBOL data file into a modern readable format.
Streams chunk-by-chunk via
yield_data()for.csv,.tsv, and.jsonloutputs; also supports.json,.xlsx, and.parquet. Aligned withconvert().- Parameters:
- datfile
Path to the raw COBOL data file.
- output
Destination file path whose extension selects the output format.
- chunksize
Number of rows per streaming chunk.
- encoding
Character encoding for
DISPLAYitems (e.g.'cp500','ascii').- float_format
Floating-point representation for
COMP-1/COMP-2('ieee'or'ibm').- byteorder
Byte order for binary fields (
'big'or'little').- include_redefines
Include
REDEFINESoverlay columns in the converted output.- include_filler
Include
FILLERcolumns (omitted by default for clean exports).- line_ending
Record delimiter mode (
'auto','none','lf', or'crlf').- dbcs_encoding
Character encoding for
PIC G/DISPLAY-1DBCS fields.- decimal_comma
Override copybook
DECIMAL-POINT IS COMMAdetection.
- Returns:
- pathlib.Path
Path to the written output file.
- Parameters:
- Return type:
- find_record(name)[source]#
Find the first
GroupItemorElementaryItemmatching name.- Parameters:
- name
Exact COBOL item name to search for.
- Returns:
- GroupItem | ElementaryItem | None
First matching item in depth-first order, or
Noneif absent.
- Parameters:
name (str)
- Return type:
GroupItem | ElementaryItem | None
- layout(include_redefines=False, include_filler=True)[source]#
Compute flat byte-offset layout of all elementary items in the copybook.
- Parameters:
- include_redefines
Include items defined under
REDEFINESoverlays.- include_filler
Include
FILLERitems in the resolved layout.
- Returns:
- list[ResolvedItem]
Ordered elementary items with exact byte offsets and widths.
- Parameters:
- Return type:
- pic_to_fwf_kwargs(convert_compressed=True)[source]#
Return keyword arguments for
pandas.read_fwf()on text copybooks.- Parameters:
- convert_compressed
Attach byte-level decoders for binary/compressed fields when
True; keep raw representations whenFalse.
- Returns:
- dict[str, Any]
Dictionary containing
colspecs,names, andconverterssuitable for unpacking intopandas.read_fwf().
- Parameters:
convert_compressed (bool)
- Return type:
- summary(include_redefines=False, include_filler=True)[source]#
Return a tabular overview of every elementary item’s byte layout and COBOL type.
- Parameters:
- include_redefines
Include
REDEFINESoverlay items in the summary table.- include_filler
Include
FILLERitems in the summary table.
- Returns:
- pandas.DataFrame
Table with columns
name,level,pic,usage,kind,offset,byte_length,signed,decimals, andis_redefines.
- Parameters:
- Return type:
- to_dataframe(datfile, nrows=None, chunksize=500, encoding=None, convert_compressed=True, drop_converters=False, float_format='ieee', byteorder='big', as_decimal=False, include_redefines=False, include_filler=True, line_ending='auto', dbcs_encoding='utf-16-be', decimal_comma=None)[source]#
Decode datfile into a single materialized
pandas.DataFrame.Reads internally via chunked streaming (
yield_data()) and stops early once nrows records have been collected. Aligned withto_dataframe().- Parameters:
- datfile
Path to the COBOL data file.
- nrows
Optional maximum number of records to return (
Nonereads all).- chunksize
Number of rows decoded per internal streaming chunk.
- encoding
Character encoding for
DISPLAYitems (auto-detected ifNone).- convert_compressed
Decode binary/compressed items; retain hex representation if
False.- drop_converters
Keep all items as raw decoded strings / hex without numeric casting.
- float_format
Floating-point representation for
COMP-1/COMP-2('ieee'or'ibm').- byteorder
Byte order for binary fields (
'big'or'little').- as_decimal
Preserve exact precision with
decimal.Decimalfor fixed-point numbers.- include_redefines
Include
REDEFINESoverlay columns.- include_filler
Include
FILLERcolumns.- line_ending
Record delimiter mode (
'auto','none','lf', or'crlf').- dbcs_encoding
Character encoding for
PIC G/DISPLAY-1DBCS items.- decimal_comma
Override copybook
DECIMAL-POINT IS COMMAdetection.
- Returns:
- pandas.DataFrame
Decoded records (empty DataFrame with copybook columns if no rows).
- Parameters:
nrows (int | None)
chunksize (int)
encoding (str | None)
convert_compressed (bool)
drop_converters (bool)
float_format (Literal['ieee', 'ibm'])
byteorder (Literal['big', 'little'])
as_decimal (bool)
include_redefines (bool)
include_filler (bool)
line_ending (Literal['auto', 'none', 'lf', 'crlf'])
dbcs_encoding (str)
decimal_comma (bool | None)
- Return type:
Notes
Because the return value is a single in-memory DataFrame, pass nrows for quick previews of very large mainframe files, or iterate directly over
yield_data()when streaming files larger than memory.
- to_pandera_schema(include_redefines=False, include_filler=True, enforce_conditions=False, coerce=False)[source]#
Generate a
pandera.pandas.DataFrameSchemafrom this copybook.- Parameters:
- include_redefines
Include
REDEFINESoverlay items as schema columns.- include_filler
Include
FILLERitems as schema columns.- enforce_conditions
Add
isinchecks derived from level-88 condition-name values.- coerce
Whether the returned schema coerces column dtypes on validation.
- Returns:
- pandera.pandas.DataFrameSchema
Schema encoding column dtypes, length/range bounds, and optional level-88 domain checks.
- Parameters:
- Return type:
DataFrameSchema
- yield_data(datfile, chunksize=500, encoding=None, convert_compressed=True, drop_converters=False, float_format='ieee', byteorder='big', as_decimal=False, include_redefines=False, include_filler=True, line_ending='auto', dbcs_encoding='utf-16-be', decimal_comma=None)[source]#
Stream records from datfile as
pandas.DataFramechunks.- Parameters:
- datfile
Path to the raw COBOL data file.
- chunksize
Maximum number of decoded records per yielded chunk.
- encoding
Character encoding for
DISPLAYitems (auto-detected ifNone).- convert_compressed
Decode binary/compressed items; retain hex representation if
False.- drop_converters
Keep all items as raw decoded strings / hex without numeric casting.
- float_format
Floating-point representation for
COMP-1/COMP-2('ieee'or'ibm').- byteorder
Byte order for binary fields (
'big'or'little').- as_decimal
Preserve exact precision with
decimal.Decimalfor fixed-point numbers.- include_redefines
Include
REDEFINESoverlay columns.- include_filler
Include
FILLERcolumns.- line_ending
Record delimiter mode (
'auto','none','lf', or'crlf').- dbcs_encoding
Character encoding for
PIC G/DISPLAY-1DBCS items.- decimal_comma
Override copybook
DECIMAL-POINT IS COMMAdetection.
- Yields:
- pandas.DataFrame
Decoded chunk of up to chunksize records.
- Parameters:
chunksize (int)
encoding (str | None)
convert_compressed (bool)
drop_converters (bool)
float_format (Literal['ieee', 'ibm'])
byteorder (Literal['big', 'little'])
as_decimal (bool)
include_redefines (bool)
include_filler (bool)
line_ending (Literal['auto', 'none', 'lf', 'crlf'])
dbcs_encoding (str)
decimal_comma (bool | None)
- Return type:
- class dataspector.coboller.copybook.GroupItem(description)[source]#
Bases:
objectHierarchical COBOL group item containing subordinate items.
- records: list[GroupItem | ElementaryItem]#
- conditions: list[ConditionName]#
- property byte_length: int#
Physical byte width of a single occurrence of this group item (including wider redefines).
- append(level, record)[source]#
Insert record at the deepest nested subgroup whose level is
< level.- Parameters:
- level
COBOL level number of the item being inserted.
- record
Group or elementary item to append.
- Parameters:
level (int)
record (GroupItem | ElementaryItem)
- Return type:
None
- find_record(name)[source]#
Depth-first search for the first subordinate item named name.
- Parameters:
- name
Exact COBOL item name to search for.
- Returns:
- GroupItem | ElementaryItem | None
First matching subordinate item, or
Noneif not found.
- Parameters:
name (str)
- Return type:
GroupItem | ElementaryItem | None
- pic_to_fwf_kwargs(convert_compressed=True)[source]#
Return flattened
pandas.read_fwf()column descriptors for this group item.
- class dataspector.coboller.copybook.ElementaryItem(description)[source]#
Bases:
objectCOBOL elementary data item carrying a
PICTUREor self-sizedUSAGE.- conditions: list[ConditionName]#
- classmethod from_clause(statement)[source]#
Construct an
ElementaryItemfrom a single COBOL declaration line.- Parameters:
- statement
Single COBOL data description clause (with or without trailing period).
- Returns:
- ElementaryItem
Parsed elementary item.
- Parameters:
statement (str)
- Return type:
- property is_binary: bool#
Trueif the item uses binary, packed, float, pointer, index, or wide storage.
- property kind: DataCategory#
COBOL
DataCategoryof this elementary item.
- decode_bytes(raw, encoding='ascii', float_format='ieee', byteorder='big', as_decimal=False, convert_compressed=True, drop_converters=False, dbcs_encoding='utf-16-be', decimal_comma=False)[source]#
Decode raw bytes for this elementary item into a Python value.
- Parameters:
- raw
Byte slice corresponding to this elementary item.
- encoding
Character encoding for
DISPLAYitems (e.g.'ascii','cp500').- float_format
Floating-point representation for
COMP-1/COMP-2('ieee'or'ibm').- byteorder
Byte order for binary and UTF-16 items (
'big'or'little').- as_decimal
Return
decimal.Decimalinstead offloat/intfor fixed-point numbers.- convert_compressed
Decode binary/packed items when
True; return hex strings whenFalse.- drop_converters
Return raw decoded text or hex without numeric conversion.
- dbcs_encoding
Character encoding for
PIC G/DISPLAY-1DBCS items.- decimal_comma
Interpret commas as decimal separators per
DECIMAL-POINT IS COMMA.
- Returns:
- Any
Decoded Python scalar (
str,int,float,Decimal, orNone).
- Parameters:
- Return type:
- pic_to_fwf_kwargs(convert_compressed=True)[source]#
Convert this item into column descriptor dicts for
pandas.read_fwf().
- dataspector.coboller.copybook.parse_copybook(rawtext)[source]#
Parse COBOL copybook source text or a file path into a record hierarchy.
- Parameters:
- rawtext
Raw copybook text or path to a copybook file.
- Returns:
- list[GroupItem | ElementaryItem]
Top-level record definitions parsed from the copybook.
- Parameters:
- Return type:
- dataspector.coboller.copybook.Field#
alias of
ElementaryItem
- dataspector.coboller.copybook.Condition#
alias of
ConditionName
- dataspector.coboller.copybook.ResolvedField#
alias of
ResolvedItem
Binary & Text Codecs#
Pure binary and text codecs for COBOL data representations (alphabetical).
- dataspector.coboller.codecs.bit_pack(bits)[source]#
Pack a
'0'/'1'bit string into COBOLUSAGE BITbytes (zero-padded right).
- dataspector.coboller.codecs.bit_unpack(raw, n_bits)[source]#
Decode a COBOL-2002
PIC 1(n) USAGE BITbyte sequence into a bit string.
- dataspector.coboller.codecs.comp3_pack(value, digits, decimals=0, exponent=None, signed=True)[source]#
Pack a numeric value into COBOL
COMP-3(BCD packed decimal) bytes.- Parameters:
- value
Numeric value to pack.
- digits
Total number of decimal digit positions in the
PICclause.- decimals
Number of implied fractional decimal digits (ignored when exponent is set).
- exponent
Optional explicit base-10 scaling exponent (e.g.
-2forV99,3forP(3)).- signed
Encode sign nibble
0xC/0xDwhenTrue, or unsigned0xFwhenFalse.
- Returns:
- bytes
Packed BCD byte sequence of length
(digits // 2) + 1.
- Parameters:
- Return type:
- dataspector.coboller.codecs.comp3_unpack(raw, decimals=0, exponent=None, as_decimal=False)[source]#
Unpack a COBOL
COMP-3/PACKED-DECIMALbyte sequence.- Parameters:
- raw
Packed BCD bytes whose final low nibble carries the sign.
- decimals
Number of implied fractional decimal digits (ignored when exponent is set).
- exponent
Optional explicit base-10 scaling exponent.
- as_decimal
Return a
decimal.DecimalwhenTrueinstead ofint/float.
- Returns:
- int | float | Decimal
Decoded numeric value.
- Parameters:
- Return type:
- dataspector.coboller.codecs.comp3decompress(x, decimals=0, as_decimal=False)[source]#
Backward-compatible alias for
comp3_unpack().
- dataspector.coboller.codecs.comp6_pack(value, digits, decimals=0, exponent=None)[source]#
Pack a non-negative value into COBOL
COMP-6(unsigned packed decimal) bytes.- Parameters:
- value
Non-negative numeric value to pack.
- digits
Total number of decimal digit positions in the
PICclause.- decimals
Number of implied fractional decimal digits (ignored when exponent is set).
- exponent
Optional explicit base-10 scaling exponent.
- Returns:
- bytes
Signless packed BCD byte sequence of length
(digits + 1) // 2.
- Parameters:
- Return type:
- dataspector.coboller.codecs.comp6_unpack(raw, decimals=0, exponent=None, as_decimal=False)[source]#
Unpack a COBOL
COMP-6(unsigned packed decimal, no sign nibble) byte sequence.- Parameters:
- raw
Signless packed BCD bytes (two decimal digits per byte).
- decimals
Number of implied fractional decimal digits (ignored when exponent is set).
- exponent
Optional explicit base-10 scaling exponent.
- as_decimal
Return a
decimal.DecimalwhenTrue.
- Returns:
- int | float | Decimal
Decoded non-negative numeric value.
- Parameters:
- Return type:
- dataspector.coboller.codecs.comp_float_pack(value, size=4, float_format='ieee', byteorder='big')[source]#
Pack a Python
floatintoCOMP-1(4-byte) orCOMP-2(8-byte) bytes.- Parameters:
- value
Floating-point number to encode.
- size
Target storage width in bytes (
4forCOMP-1,8forCOMP-2).- float_format
Binary floating-point format (
'ieee'or'ibm'HFP).- byteorder
Byte order for IEEE 754 encoding (
'big'or'little').
- Returns:
- bytes
Encoded 4-byte or 8-byte floating-point sequence.
- Parameters:
- Return type:
- dataspector.coboller.codecs.comp_float_unpack(raw, float_format='ieee', byteorder='big')[source]#
Unpack a COBOL
COMP-1(4-byte) orCOMP-2(8-byte) floating-point value.- Parameters:
- raw
4-byte or 8-byte floating-point representation.
- float_format
Binary floating-point format (
'ieee'or'ibm'HFP).- byteorder
Byte order for IEEE 754 decoding (
'big'or'little').
- Returns:
- float
Decoded Python floating-point number.
- Parameters:
- Return type:
- dataspector.coboller.codecs.comp_pack(value, byte_length, signed=True, byteorder='big', exponent=0)[source]#
Pack a numeric value into COBOL binary
COMPbytes.- Parameters:
- value
Numeric value to pack.
- byte_length
Exact width in bytes of the target binary integer field.
- signed
Use two’s-complement signed encoding when
True, unsigned whenFalse.- byteorder
Byte order (
'big'or'little').- exponent
Base-10 scaling exponent applied before integer packing.
- Returns:
- bytes
Binary integer byte sequence of length byte_length.
- Parameters:
- Return type:
- dataspector.coboller.codecs.comp_unpack(raw, signed=True, byteorder='big', exponent=0, as_decimal=False)[source]#
Unpack a COBOL binary integer (
COMP,COMP-4,COMP-5,COMP-X,BINARY-*).- Parameters:
- raw
Raw binary integer bytes.
- signed
Interpret as two’s-complement signed when
True, unsigned whenFalse.- byteorder
Byte order (
'big'or'little').- exponent
Base-10 scaling exponent applied to the unpacked integer.
- as_decimal
Return a
decimal.DecimalwhenTrue.
- Returns:
- int | float | Decimal
Decoded numeric value.
- Parameters:
- Return type:
- dataspector.coboller.codecs.expand_pic(pic, max_repeat=100000)[source]#
Expand repeat counts in a COBOL
PICstring (e.g.'S9(5)V9(2)'->'S99999V99').- Parameters:
- pic
Raw COBOL
PICTUREclause string.- max_repeat
Upper bound on any single repeat factor or expanded string length (guards against memory exhaustion on malformed copybooks).
- Returns:
- str
Uppercase expanded
PICTUREstring with repeat factors unfolded.
- Parameters:
- Return type:
- dataspector.coboller.codecs.external_float_unpack(raw, expanded_pic='', encoding='ascii', decimal_comma=False)[source]#
Decode a COBOL external floating-point
USAGE DISPLAYitem.- Parameters:
- raw
Encoded character bytes representing the external floating-point value.
- expanded_pic
Expanded
PICTUREclause used to infer impliedVdecimal placement.- encoding
Character encoding of raw (e.g.
'ascii','cp500').- decimal_comma
Interpret commas as decimal points when
True.
- Returns:
- float
Decoded floating-point value.
- Parameters:
- Return type:
- dataspector.coboller.codecs.float_to_ibm_hfp(value, size=4)[source]#
Encode a Python
floatinto 4-byte or 8-byte IBM Hexadecimal Floating-Point.
- dataspector.coboller.codecs.ibm_hfp_to_float(raw)[source]#
Decode a 32-bit or 64-bit IBM Hexadecimal Floating-Point (HFP) byte sequence.
- dataspector.coboller.codecs.parse_numeric_edited(text, blank_when_zero=False, decimal_comma=False)[source]#
Parse a COBOL numeric-edited display string (e.g.
' $1,234.50-') tofloat.- Parameters:
- text
Formatted numeric-edited string containing currency, suppression, or sign tokens.
- blank_when_zero
Return
0.0instead ofNonefor all-blank fields whenTrue.- decimal_comma
Interpret commas as decimal points and periods as thousands separators when
True.
- Returns:
- float | None
Parsed numeric value, or
Nonefor blank fields when blank_when_zero isFalse.
- Parameters:
- Return type:
float | None
- dataspector.coboller.codecs.predict_encoding(file_path, n_lines=20)[source]#
Predict a file’s character encoding via
chardet, falling back to'ascii'.
- dataspector.coboller.codecs.zoned_pack(value, digits, encoding='ascii', signed=False, sign_mode=SignMode.TRAILING_OVERPUNCH, exponent=0)[source]#
Pack a numeric value into COBOL
USAGE DISPLAYzoned decimal bytes.- Parameters:
- value
Numeric value to encode.
- digits
Total number of digit positions in the
PICclause.- encoding
Target character encoding (EBCDIC codepage or ASCII-compatible encoding).
- signed
Encode sign information when
True.- sign_mode
Sign placement/encoding convention (leading/trailing, overpunch/separate).
- exponent
Base-10 scaling exponent applied before encoding digits.
- Returns:
- bytes
Encoded zoned decimal byte sequence.
- Parameters:
- Return type:
- dataspector.coboller.codecs.zoned_unpack(raw, encoding='ascii', signed=False, sign_mode=SignMode.TRAILING_OVERPUNCH, exponent=0, as_decimal=False)[source]#
Unpack a COBOL
USAGE DISPLAYzoned decimal byte sequence.- Parameters:
- raw
Encoded zoned decimal bytes.
- encoding
Character encoding of raw (EBCDIC or ASCII-compatible).
- signed
Decode sign overpunch or separate sign character when
True.- sign_mode
Sign placement/encoding convention (leading/trailing, overpunch/separate).
- exponent
Base-10 scaling exponent applied to the decoded integer.
- as_decimal
Return a
decimal.DecimalwhenTrue.
- Returns:
- int | float | Decimal
Decoded numeric value.
- Parameters:
- Return type:
- dataspector.coboller.codecs.compute_decimal_exponent(expanded_pic)[source]#
Return base-10 exponent implied by
VandPsymbols in a PIC string.
- dataspector.coboller.codecs.is_ebcdic(encoding)[source]#
Return
Trueif encoding refers to an EBCDIC codepage.
Copybook Statement Parser#
Stateless COBOL copybook line cleaning and clause parsing helpers.
- dataspector.coboller.parser.clean_cobol_line(line)[source]#
Strip fixed-format COBOL sequence/comment/ID areas and return code text.
- dataspector.coboller.parser.extract_statements(rawtext)[source]#
Join multi-line COBOL statements and split on terminating periods.
- dataspector.coboller.parser.parse_condition_values(raw_value)[source]#
Parse discrete literal values from a level-88
VALUEclause.
Constants & Enums#
Enums, compiled regular expressions, and lookup tables for dataspector.coboller.
- class dataspector.coboller.constants.Usage(*values)[source]#
COBOL
USAGEstorage representations.- DISPLAY = 'DISPLAY'#
- DISPLAY_1 = 'DISPLAY-1'#
- COMP = 'COMP'#
- COMP_1 = 'COMP-1'#
- COMP_2 = 'COMP-2'#
- COMP_3 = 'COMP-3'#
- COMP_5 = 'COMP-5'#
- COMP_6 = 'COMP-6'#
- COMP_X = 'COMP-X'#
- BINARY_CHAR = 'BINARY-CHAR'#
- BINARY_SHORT = 'BINARY-SHORT'#
- BINARY_LONG = 'BINARY-LONG'#
- BINARY_DOUBLE = 'BINARY-DOUBLE'#
- FLOAT_SHORT = 'FLOAT-SHORT'#
- FLOAT_LONG = 'FLOAT-LONG'#
- NATIONAL = 'NATIONAL'#
- UTF_8 = 'UTF-8'#
- BIT = 'BIT'#
- POINTER = 'POINTER'#
- PROCEDURE_POINTER = 'PROCEDURE-POINTER'#
- FUNCTION_POINTER = 'FUNCTION-POINTER'#
- INDEX = 'INDEX'#
- class dataspector.coboller.constants.SignMode(*values)[source]#
COBOL sign encoding modes for
USAGE DISPLAYsigned numeric items.- NONE = 'NONE'#
- TRAILING_OVERPUNCH = 'TRAILING'#
- LEADING_OVERPUNCH = 'LEADING'#
- TRAILING_SEPARATE = 'TRAILING SEPARATE'#
- LEADING_SEPARATE = 'LEADING SEPARATE'#
- class dataspector.coboller.constants.DataCategory(*values)[source]#
COBOL data category of an elementary item.
- ALPHABETIC = 'ALPHABETIC'#
- ALPHANUMERIC = 'ALPHANUMERIC'#
- NATIONAL = 'NATIONAL'#
- UTF8 = 'UTF8'#
- DBCS = 'DBCS'#
- BIT = 'BIT'#
- INTEGER = 'INTEGER'#
- DECIMAL = 'DECIMAL'#
- NUMERIC_EDITED = 'NUMERIC_EDITED'#
- EXTERNAL_FLOAT = 'EXTERNAL_FLOAT'#
- BINARY = 'BINARY'#
- PACKED_DECIMAL = 'PACKED_DECIMAL'#
- PACKED_UNSIGNED = 'PACKED_UNSIGNED'#
- FLOAT = 'FLOAT'#
- POINTER = 'POINTER'#
- INDEX = 'INDEX'#
- dataspector.coboller.constants.FieldKind#
alias of
DataCategory