A collection of Profound Utils, to help simplify tasks in various Profound products.
- Getting Started
- Utils
- Recommended Setup for Mass-Conversions
- Issues
- Built With
- Versioning
- Authors
- License
- Acknowledgements
These instructions will get you a copy of the project up and running on your machine.
You will need to have Node.js installed in order to run these utilities.
Decide where you want to install these utils. Maybe your Home folder?
$ cd ~
Now you just need to clone this repository from Github
$ git clone [email protected]:ProfoundLogic/profound-utils.git
Then you can change your current folder into this folder
$ cd profound-utils
Finally, install all of the project dependencies from npm
$ npm i
You can issue the following command to get a list of Utility commands currently available. Please see each section of this README for a detailed description on each utility.
$ node .
You can type the following on each utility to get additional help information
$ node <utility-name> --help
or
$ node <utility-name> ?
This utility will check for any unexpected DDS issues, by running two consecutive conversions to verify the DDS conversion logic. It will take parameters for the initial DDS input, then run the DDS->JSON converter, and then the JSON->DDS converter. It then compares the new DDS source back to the original DDS source, and reports any discrepancies.
$ node verifyConvert input-DDS-file [input-library] [input-member]
input-DDS-file
This is the Input DDS source to verify. It can be a Source Physical File (e.g. QDDSSRC), or a path-based file name.
[input-library]
(Optional). If input-DDS-file is a Source Physical File, then this is required, and specifies the Library containing the Source Physical File.
[input-member]
(Optional). If input-DDS-file is a Source Physical File, then this is required, and specifies the Member Name that contains the DDS data for conversion.
This utility will convert an existing DDS source-based Display File into JSON format. This will allow you to realize many advantages over the DDS version, such as performing mass Find/Replace changes in your favorite Source editor, moving the screen to a Git repository for change control, etc.
$ node ddsToJson output-directory input-DDS-file [input-library] [input-member]
output-directory
The Output Directory where the converted JSON file will be created. This Output Directory must exist and have write permissions. The converted file will be named as LIBRARY.FILE.MEMBER.json
input-DDS-file
This is the Input DDS file that contains the DDS data you want to convert.
It can be a Source Physical File (e.g. QDDSSRC), or a path-based file name.
[input-library]
(Optional). If input-DDS-file is a Source Physical File, then this is required, and specifies the Library containing the Source Physical File.
[input-member]
(Optional). If input-DDS-file is a Source Physical File, then this is required, and specifies the Member Name that contains the DDS data for conversion.
This utility will convert an existing JSON-based Rich Display File into DDS format. This will allow you to convert JSON files back into native DDS format, ready for compile and/or testing.
This conversion will take ALL the existing DDS source lines from the OLD DDS Source File/Member, but will insert the changed JSON sections from the NEW source file, and insert them into the HTML tags. This eliminates any risks from parsing the NEW file, but means that you cannot do the following:
- Add or Remove any Record Formats in the new source file.
- Add or remove any Bound fields in the new source file.
$ node jsonToDds input-JSON-file output-DDS-file output-library output-member original-DDS-file original-library original-member
input-JSON-file
This is the Input JSON file to be converted into DDS format.
output-DDS-file
This is the Output file name. It can be a Source Physical File, or a path-based file name. If this is a Source Physical File, it must exist.
[output-library]
(Optional). If output-DDS-file is a Source Physical File, then this is required, and specifies the Library containing the Source Physical File. The Library must exist.
[output-member]
(Optional). If output-DDS-file is a Source Physical File, then this is required, and specifies the Member Name that will be created to contain the converted DDS data. The Member must NOT exist, to prevent accidentally overwriting existing data.
Maybe you have a lot of DDS Source members you want to convert? You could add a PDM User-Defined Option to assist with converting multiple/all members in a DDS Source file.
The syntax for this is as follows
Option . . . . . . . . . DJ Option to create
Command . . . . . . . . . qsh CMD('node /path/to/utils/repo/profound-utils/ddsToJson.js /absolute/path/to/output-directory-name &F &L &N')
In order for this to run correctly, your current job must have the following Environment Variable set to Allow Multiple Threads
Name . . . . . . . . . : QIBM_MULTI_THREADED
Value . . . . . . . . . : 'Y'
You may want to prevent Interactive Shell Command Output from interrupting each request
Name . . . . . . . . . : QIBM_QSH_CMD_OUTPUT
Value . . . . . . . . . : 'NONE'
Any issues or feature requests should be logged here.
- Standard - JavaScript Standard Style
- idb-pconnector - Promise-based DB2 Connector for IBM i
- pino - Node.js logger, inspired by Bunyan
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Andy Fox - DDS/JSON Conversion Verifier - Profound Logic
- Andy Fox - DDS to JSON - Profound Logic
- Andy Fox - JSON to DDS - Profound Logic
See also the list of contributors who participated in this project.
You must purchase a Profound UI or a Profound.js license to use this repository.
- A great README template from PurpleBooth.