CREATE
Creates a new empty IPM file or containing previously exported records.
Syntax
$ cardak help create
usage: cardak create [<flags>] <file>
Create a new IPM file
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
-v, --verbose Add more information displayed on some commands.
--mono Supress color on output.
--ignore Try to ignore some errors and continue processing the file
-W, --width Ignore small terminal width check and force execution
-z, --silent Suppress all output (banner, headers, summary) except the results. Specially useful for DESCRIBE command piped to a search
utility like fzf
--import=IMPORT File containing the records to be imported
--pds105=PDS105 String representing the value of PDS 0105
--file-type=FILE-TYPE File Type to be used in the header
--file-date=FILE-DATE File date, defaults to today
--processor-id=PROCESSOR-ID
The processor ID
--sequence-number=SEQUENCE-NUMBER
The sequence number
--processing-mode=PROCESSING-MODE
The processing mode, T or P
--encoding=ENCODING Encoding for new file, default ASCII
--block If present, the file will be in block 1014
Args:
<file> IPM file name to create
Description
With this command we can create a new IPM file and optionally load records previously exported from another file with the EXPORT command.
To create a new file, we need to indicate the File ID which is part of the file header, and the File Processing Mode. We can indicate the full content of tield PDS0105 (the full 25 characters of the File ID), or indicate each subield of that PDS.
If we decide ton indicate the subfields, we need at least to indicate SF01 (File Type) and SF03 (Processor ID). If we don't indicate SF02 (File Reference Date) it will assume the current date, and for SF04 (File Sequence Number) it is set with the value 1000
If we don't indicate the Processing mode, by default it will assume the value “T” (Test)
Other parameters we can indicate are the encoding (assuming ASCII) and if the file will use blocks of 1014 (by default, no)
If we don't indicate any file with records to import, an empty file will be generated, so it will contain just one header and one trailer. Later on, we can import records using the IMPORT command.
If we ask to import records from a previously exported file, we can use either a CSV file or an HEX file (with extension .ckh)