Samples
TIBCO Active Matrix Business Works Plug-in for Data Conversion comes with samples. The samples are packaged in {TIBCO_HOME}/bw/palettes/bwdcp/{plug-in version}/sample.zip archive.
Prerequisite: Use the following procedure to import the sample projects into Business Works Studio (Studio).
- Open Studio.
- Select File > Import in the menu.
- Select Existing Projects into Workspace.
- Click Next.
- Select Select archive file and click Browse.
- Navigate to {TIBCO_HOME}/bw/palettes/bwdcp/{plug-in version}/samples directory.
- Select samples.zip.
- Select the sample projects to import.
- Click Finish.
Sample Name | Description | Preparation Steps |
simpleCOBOL Sample | Demonstrates render-parse rountrip for COBOL data. | None |
simpleRPG sample | Demonstrates render-parse rountrip for RPG data. | None |
simplePLI sample | Demonstrates render-parse rountrip for PL/I data. | None |
repeatingCobol Sample | Demonstrates parsing and rendering of COBOL data with OCCURS clause in the copybook. | Open the process contained in the repeatingCOBOL package and adjust the path to the file repeating.bin. |
redefinesCobol | Demonstrates parsing and rendering of COBOL data with REDEFINES clause in the copybook. The copybook defines control values that are used during parsing. See the Field Configuration tab in the redefines.copybook resource located in the redefinesCOBOL package. | Open the process contained in redefinesCOBOL package and adjust the path to the file redefines.bin. |
ebcdicToAsciiFileConvert | Demonstrates text file conversion from Cp037 to Ascii. This method works by sequentially reading the Cp037 encoded text from a file, and appending Asii text to an output file. The conversion is achieved using a Parse activity and a COBOL copybook that contains one text field. | 1. Specify input and output path files (including file names) in module properties
ebcdicFile and
asciiFile.
2. Run the process ebcdictoasciifileconvert/createTestDataProcess.bwp to create sample data that is encoded with a Cp037 character set and is placed in the location specified in the ebcdicFile module property. 3. To perform the conversion run the ebcdictoasciifileconvert/convertProcess.bwp process, which will place the Ascii copy of the sample data into the file you specified in the asciiFile module property. The advantage of this approach is that the file is converted in small chunks. This keeps the memory footprint small and a file of any size can be processed. |
mainframe-ems-sample |
This project demonstrates data transmission and conversion between a BusinessWorks process and programs written in COBOL, PL/I, and RPG. The data is transmitted in binary form using the TIBCO Enterprise Message Service™ Processes in the mainframe-ems-sample package implement the receive-send flow for all three languages. This flow is as follows: a program sends a binary message to the BusinessWorks process, which parses the message, renders a binary response, and returns the message to the program. The program logs the data found in the response message. The corresponding programs and artifacts are available in the samples.zip file. Look for the top level directory EMS and the subdirectories zOS-COBOL, IBMi-RPG, and zOS-PLI. Each of these directories contains program source code, copybooks, and jcl files to run the programs. |
1. Compile and link the programs.
2. Make sure that an EMS server is running and accessible from both BusniessWorks and the sample programs. 3. For COBOL and PL/I, specify your Enterprise Message Service server URL in the EMSPDCP1.jcl file on the line that contains the following: // PARM='ems.server.url:<port>' 4. Specify your Enterprise Message Service server URL in the module property jms-provider-url of the BusniessWorks project. Steps to run a sample process: 1. Start a specific BusinessWorks process from the mainframe-ems-sample package. The process waits for an EMS message. 2. For COBOL and PL/I, submit an EMSPDCP1.jcl job. 3. For PRG, use the following job command: CALL PGM(library_name/EMSRDCP1) PARM('TCP://EMS-SERV:nnnn') where: - TCP://EMS-SERV:nnnn is the URL of your Enterprise Message Service server. - library_name is your product library name, which defaults to TIBEMSLIB. |