Professional Documents
Culture Documents
Copyright 2007 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved. Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without limitation, these intellectual property rights may include one or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or pending patent applications in the U.S. and in other countries. U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Use is subject to license terms. This distribution may include materials developed by third parties. Sun, Sun Microsystems, the Sun logo, Java, Sun Java Composite Application Platform Suite, SeeBeyond, eGate, eInsight, eVision, eTL, eXchange, eView, eIndex, eBAM, eWay, and JMS are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon architecture developed by Sun Microsystems, Inc. UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd. This product is covered and controlled by U.S. Export Control laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is strictly prohibited. Copyright 2007 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, Etats-Unis. Tous droits rservs. Sun Microsystems, Inc. dtient les droits de proprit intellectuels relatifs la technologie incorpore dans le produit qui est dcrit dans ce document. En particulier, et ce sans limitation, ces droits de proprit intellectuels peuvent inclure un ou plus des brevets amricains lists l'adresse http://www.sun.com/patents et un ou les brevets supplmentaires ou les applications de brevet en attente aux Etats - Unis et dans les autres pays. L'utilisation est soumise aux termes de la Licence. Cette distribution peut comprendre des composants dvelopps par des tierces parties. Sun, Sun Microsystems, le logo Sun, Java, Sun Java Composite Application Platform Suite, Sun, SeeBeyond, eGate, eInsight, eVision, eTL, eXchange, eView, eIndex, eBAM et eWay sont des marques de fabrique ou des marques dposes de Sun Microsystems, Inc. aux Etats-Unis et dans d'autres pays. Toutes les marques SPARC sont utilises sous licence et sont des marques de fabrique ou des marques dposes de SPARC International, Inc. aux Etats-Unis et dans d'autres pays. Les produits portant les marques SPARC sont bass sur une architecture dveloppe par Sun Microsystems, Inc. UNIX est une marque dpose aux Etats-Unis et dans d'autres pays et licencie exclusivement par X/Open Company, Ltd. Ce produit est couvert la lgislation amricaine en matire de contrle des exportations et peut tre soumis la rglementation en vigueur dans d'autres pays dans le domaine des exportations et importations. Les utilisations, ou utilisateurs finaux, pour des armes nuclaires, des missiles, des armes biologiques et chimiques ou du nuclaire maritime, directement ou indirectement, sont strictement interdites. Les exportations ou rexportations vers les pays sous embargo amricain, ou vers des entits figurant sur les listes d'exclusion d'exportation amricaines, y compris, mais de manire non exhaustive, la liste de personnes qui font objet d'un ordre de ne pas participer, d'une faon directe ou indirecte, aux exportations des produits ou des services qui sont rgis par la lgislation amricaine en matire de contrle des exportations et la liste de ressortissants spcifiquement dsigns, sont rigoureusement interdites. Part Number: 820-0941 Version 20070425110641
Contents
Contents
Chapter 1
6
6
6
7
8
8 9
9 9 9 10
10 10
11
11 11
Installing the COBOL Copybook Converter on an eGate supported system 12 Adding the eWay to an Existing Sun Java Composite Application Platform Suite Installation 12 Extracting the Sample Projects 13
13
16
16
18
19 19
Contents
20
20 20 21 22 22 23 24 24 25 25 25 26 26 26 26 27 27 28 28 29 30
Chapter 4
32
33 34 34
Importing the Sample Projects Running the Sample Projects Building, Deploying, and Running the prjCOBOL_JCD_Sample Project
Creating a Project Creating the OTDs Creating a Connectivity Map Populating the Connectivity Map Creating the Collaboration Definitions (Java) Creating the Collaboration Business Rules Creating the prjCOBOL_JCD_Sample Business Rules Binding the eWay Components Creating an Environment Configuring the eWays Configuring the eWay Properties Configuring the Environment Explorer Properties Configuring the Integration Server Creating the Deployment Profile Creating and Starting the Domain
34 35 35
36 36 38 39 39 41 41 46 47 48 49 49 49 50 50
Contents
51 51
52
52 52 54 54 55 56 57 57 58 59 60 60 61 61 62 62 63
Appendix A
64 66
Chapter 1
1.1
1.1.1
column 72 (e.g., content that is not line numbering or comments, which should be ignored), deselect the Ignore copybook content beyond column 72 option. Caution: It is still possible for a copybook with data beyond the 72th column to process successfully--but not correctly--if the latter option is selected. Figure 1 demonstrates copybook content beyond column 72 that may be incorrectly processed. Figure 1 Copybook content beyond column 72.
If you disable content past column 72, the word COMP that begins in column 73 is ignored. Even without this word, the content that appears within the first 72 columns composes a correct (but now misinterpreted) description entry. With the option selected, the entry describes XYZABC12345678ZZ as a 18-character alpha-numeric item, using 18 bytes of storage (implicit USAGE is DISPLAY). With the option disabled, the entry describes a 18-digit numeric item using 8 bytes of storage (USAGE is COMP).
1.2
1.2.1
Unsupported Features
The following COBOL Copybook features are not supported by the COBOL Copybook Converter: COBOL Copy Statements COBOL copy statements that are embedded within the COBOL Copybook are not supported. Usage Pointer Usage pointer statements are not supported. To accommodate these elements, you must change the statement to PIC X(4). The COBOL Copybook Converter interprets this and creates a node of the correct length with the subsequent nodes as siblings instead of child nodes. Complete COBOL programs these contain non-working storage and nonlinkage areas (such as an Environment Division area). The COBOL Copybook Converter processes COBOL files with working-storage and linkage-section record entries only.
1.3
1.4
1.4.1
Scope
This users guide provides a description of the COBOL Copybook Converter. It includes directions for installing the Converter, configuring the Converter properties, and implementing the Converters sample Projects. This document is also intended as a reference guide, listing available properties, functions, and considerations.
1.4.2
Intended Audience
This guide is intended for experienced computer users who have the responsibility of helping to set up and maintain a fully functioning Java Composite Application Platform Suite system. This person must also understand any operating systems on which the Java Composite Application Platform Suite will be installed (Windows and UNIX), and must be thoroughly familiar with Windows-style GUI operations.
1.4.3
Text Conventions
The following conventions are observed throughout this document. Table 1 Text Conventions
Text Convention Used For Names of buttons, files, icons, parameters, variables, methods, menus, and objects Command line arguments, code samples; variables are shown in bold italic Examples Click OK. On the File menu, click Exit. Select the eGate.sar file. java -jar filename.jar
Bold
Monospaced
http://www.sun.com
1.4.4
Related Documents
The following Sun documents provide additional information about the Sun Java Composite Application Platform Suite product: Sun SeeBeyond eGate Integrator Users Guide Sun Java Composite Application Platform Suite Installation Guide
1.5
1.6
Documentation Feedback
We appreciate your feedback. Please send any comments or suggestions regarding this document to: CAPS_docsfeedback@sun.com
10
Chapter 2
2.1
2.2
11
2.2.1
Adding the eWay to an Existing Sun Java Composite Application Platform Suite Installation
If you are adding the eWay to an existing Sun Java Composite Application Platform Suite installation, do the following: 1 Complete steps 1 through 4 above. 2 Once your products installation is complete, open the Enterprise Designer and select Update Center from the Tools menu. The Update Center Wizard appears. 3 For Step 1 of the wizard, simply click Next. 4 For Step 2 of the wizard, click the Add All button to move all installable files to the Include in Install field, then click Next. 5 For Step 3 of the wizard, wait for the modules to download, then click Next. 6 The wizards Step 4 window displays the installed modules. Review the installed modules and click Finish.
12
7 When prompted, restart the IDE (Integrated Development Environment) to complete the installation.
2.2.2
2.3
13
Install Java CAPS 5.1.3 1 Install Java CAPS 5.1.3, including all eWays, libraries, and other components used by your ICAN 5.0 Projects. 2 Start the Java CAPS 5.1.3 Enterprise Designer. Import the Project 1 From the Java CAPS 5.1.3 Enterprise Designers Project Explorer tree, right-click the Repository and select Import Project from the shortcut menu. The Import Manager appears. 2 Browse to and select your exported Project file. 3 Click Import. A warning message, Missing APIs from Target Repository, may appear at this time. This occurs because various product APIs were installed on the ICAN 5.0 Repository when the Project was created that are not installed on the Java CAPS 5.1.3 Repository. These APIs may or may not apply to your Projects. You can ignore this message if you have already installed all of the components that correspond to your Projects. Click Continue to resume the Project import. 4 Close the Import Manager after the Project is successfully imported. Deploy the Project 1 A new Deployment Profile must be created for each of your imported Projects. When a Project is exported, the Projects components are automatically checked in to Version Control to write-protected each component. These protected components appear in the Explorer tree with a red padlock in the bottom-left corner of each icon. Before you can deploy the imported Project, the Projects components must first be checked out of Version Control from both the Project Explorer and the Environment Explorer. To check out all of the Projects components, do the following: A From the Project Explorer, right-click the Project and select Version Control > Check Out from the shortcut menu. The Version Control - Check Out dialog box appears. B Select Recurse Project to specify all components, and click OK. C Select the Environment Explorer tab, and from the Environment Explorer, rightclick the Projects Environment and select Version Control > Check Out from the shortcut menu. D Select Recurse Environment to specify all components, and click OK. 2 If your imported Project includes File eWays, these must be reconfigured in your Environment prior to deploying the Project. To reconfigure your File eWays, do the following: A From the Environment Explorer tree, right-click the File External System, and select Properties from the shortcut menu. The Properties Editor appears. B Set the inbound and outbound directory values, and click OK. The File External System can now accommodate both inbound and outbound eWays. 3 Deploy your Projects.
14
Note: Only projects developed on ICAN 5.0.2 and later can be imported and migrated successfully into the Sun Java Composite Application Platform Suite.
15
Chapter 3
3.1
16
3 Browse for the desired COBOL Copybook file and highlight it. 4 Click the Add button to include a copybook file in a project. 5 Repeat Steps 3 and 4 for each file to include in the project. To remove a copybook file from the project, highlight the file name in the Select Files container and click Remove. 6 Click Next. The Configure Converter Options page appears.
17
7 Optionally, add/remove checks from boxes to enable/disable options: Ignore copybook content beyond column 72 -- The Converter expects copybooks to be width-compliant with IBMs COBOL reference format. Uncheck this box to process books with content (excluding comments/line numbers) beyond column 72. Default: enabled (box is checked). Check Item names against reserved words -- The Converter disallows data item names that match reserved words. Uncheck this box to process copy books that use reserve words for item names. When name checking is disabled, the Converter cannot process copy books with unnamed items (i.e., implicit FILLER items). Default: enabled (box is checked). 8 Click Finish. The OTD Editor window appears, displaying the OTD.
3.1.1
18
END-3:IMPORT-GRP-LST-END-3-0026EV:IE01-ENDORSEMENT-SUBJEC0026ET:DEDUCTIBLE-LOSS-SETTLMNT-COOL' found under parent data item '7 IE01-ENDORSEMENT-SUBJEC-0026ET FQN = FORMATTER-COPYBOOK:SEEB-GROUPLST-END-3-0006RG:NEW-IMPORT-GROUP-LST-END-3:IMPORT-GRP-LST-END-30026EV:IE01-ENDORSEMENT-SUBJEC-0026ET'
3.2
The figure above shows the Copybook Converter OTD built from the sample copybook qan3glr1.cobol. The OTD has a node for each of the business processes that may be performed on the converted copybook. The unmarshal method allows business processes to flow data into the copybook OTDs and access contents field-by-field.
3.3
Relaunching OTDs
A single OTD can consist of many lines of metadata. When a change to the metadata occurs in an OTD, it does not have to be recreated from scratch. Using the Relaunch function allows the OTD to be rebuilt and saved under the same name, then relaunched back to the same Java Collaboration Definition (JCD) or Business Process Execution Language (BPEL). To Relaunch an Existing OTD 1 In the Enterprise Explorer, right-click on the OTD. From the submenu, click Relaunch. The Select Files Wizard opens.
19
2 Enter the File Name (or Browse and Select) that you wish to be relaunched and click Next. Note: The File Name must be identical to the original since the name is used to generate the OTD name. 3 Continue with the Wizard as described when creating the OTD.
4 Click the Finish button to save the changes. When relaunching an OTD, an existing collaboration will not be affected if: New columns are added Deleted columns are not used in the original collaboration Note: Validation will fail if existing collaborations are not modified when columns are renamed or deleted.
3.4
3.4.1
20
An ambiguity arises when an OTD field, corresponding to a usage display item, is also the object of redefinition(s) in the Copybook. Redefined items may have alternate, multiple storage types, and to deal with such an item, the OTD must decide which one of the multiple definition is in effect at the time of unmarshaling or marshaling, in relation to the available data. The current implementation of COBOL Copybook OTDs resolve this ambiguity by ignoring redefinitions. The decision whether or not to apply encoding to a field is based solely on the item's original storage specification in the Copybook. DBCS Items COBOL Copybook OTDs do not support any particular Double Byte Character Set (DBCS) encoding. When inserted into DBCS nodes, it will not perform inspections of data to determine what specific DBCS encoding is used by character codes or byte sequences (e.g., discerning between a double-byte and a multi-byte encoding). As a consequence: DBCS items are represented in the OTD by Java byte array nodes, and their content will be treated as binary "blobs" with the following rules: If content is set directly to a DBCS node, it is stored as-is. If the content is retrieved directly from the DBCS node, the content that was originally set is also returned as-is. If content is unmarshaled via the OTD root, the portion corresponding to the DBCS node is stored as-is. It should be noted however, that correctness of the aggregate input is the responsibility of the root-level unmarshal call (e.g., do not use unmarshalFromString if the OTD contains DBCS items). If the OTD's content is marshaled, the portion corresponding to the DBCS node is yielded as-is, and is excluded from any character set transcoding that character data nodes of the OTD may be subjected to. Copybook OTDs will not auto-truncate DBCS data. Since the OTD cannot know the specific DBCS encoding of the data, it cannot correctly truncate it at the correct character boundaries. If the content which is set directly to a DBCS node exceeds the item's width, the OTD will raise an exception.
3.4.2
Root-level Methods
The following methods are the root-level methods provided: enableUnmarshalValidation(boolean enable) Method on page 22 marshal() Method on page 22 marshal(String charset) Method on page 23 marshal(OtdOutputStream out) Method on page 24 marshal(OtdOutputStream out, String charset) Method on page 24 marshalToString() Method on page 25 reset() Method on page 25 resetHigh() Method on page 25
21
resetLow() Method on page 26 retrieveEncoding() Method on page 26 unmarshal(byte[] in) Method on page 26 unmarshal(OtdInputStream in) Method on page 26 unmarshal(OtdInputStream in, String charset) Method on page 27 unmarshal(byte[] in, String charset) Method on page 27 unmarshalFromString(String in) Method on page 28 useEncoding(String enc) Method on page 28
marshal() Method
The marshal() method serializes the OTDs content as an array of bytes. The content is encoded with the OTD's current encoding, which is the encoding specified when data was last unmarshaled (see setEncoding() and unmarshal() for additional details). If no data was unmarshaled prior to a marshal call, then the OTD defaults to EBCDIC CP037 encoding. If the OTD content is incompatible with the current encoding (this can happen when data was unmarshaled with a different encoding than the current one), a com.stc.otd.runtime.MarshalException occurs.
22
23
24
marshalToString() Method
The marshalToString() method serializes the content of the OTD to a String object. The String is created by decoding the byte data with the OTD's current encoding, which is the encoding specified when data was last unmarshaled (see setEncoding and unmarshal documentation for additional details). If no data was unmarshaled prior to a marshal call, then the OTD defaults to EBCDIC CP037 encoding. Only use this method with copybook OTDs built from copybooks comprised solely of usage display entries. Using this method on OTDs designed to hold binary data (e.g., packed decimal, internal decimal) may invalidate the data, because portions of the binary content may not have a suitable mapping to UTF-8. A java.io.UnsupportedEncodingException may occur if the current encoding (i.e., the encoding used by the last unmarshal call) is not capable of encoding the data. This is possible because certain charset encodings in Java are not two-way encodings (encodings that can decode or encode, but not both). Table 7 marshalToString Method
Syntax String marshalToString() Throws MarshalException, IOException, UnsupportedEncodingException Examples
reset() Method
The reset() method initializes the storage space of the OTD as follows: alphanumeric fields (PIC X) - blank spaces (EBCDIC value 0x40) numeric fields (PIC 9) - binary zero packed decimal fields - signed-trailing packed binary zero Table 8 reset() Method
Syntax void reset() None. Throws Examples
resetHigh() Method
The resetHigh() method initializes the entire storage space of the OTD to high bit values; each byte is initialized to 0xFF. Table 9 resetHigh() Method
Syntax void resetHigh() None. Throws Examples
25
resetLow() Method
The resetLow() method initializes the OTD storage space to low bit values; each byte is initialized to 0x0. Table 10 resetLow() Method
Syntax void resetLow() None. Throws Examples
retrieveEncoding() Method
The retrieveEncoding() method returns the canonical name of the current OTD encoding. The default current OTD encoding is "CP037" until it is changed by a successful useEncoding call, or by a call to one of the encoding-specifiable unmarshal methods. The canonical name may differ from the one used previously to set the current encoding. See the Java 2 API documentation for java.nio.charset. Charset for more information. Table 11 retrieveEncoding() Method
Syntax String retrieveEncoding() None. Throws Examples
26
CP037. This method sets the OTD's current encoding to EBCDIC CP037, which is used when data is subsequently marshaled without overriding encoding; e.g., as allowed in a marshal (OtdOutputStream, String) call. Table 13 unmarshal(OtdInputStream in) Method
Syntax void unmarshal(OtdInputStream in) Throws UnmarshalException, IOException Examples
27
28
If the specified encoding is not supported, or is not a two-way encoding (one that can decode or encode, but not both), a java.io.UnsupportedEncodingException is thrown. Table 17 useEncoding(String enc) Method
Syntax void useEncoding(String enc) Throws UnsupportedEncodingException Examples
3.4.3
Non-Root Methods
Every leaf node in a COBOL Copybook OTD represents an elementary item in the Copybook source. For every given leaf node, the OTD provides getter and setter methods of which the return type and input types depend on the data type and usage type specified in the copybook for the elementary item to which the node corresponds. For a given non-repeating leaf node named Datum, the following method forms are provided, where T is determined from the follow table. T getDatum() void setDatum(T) Table 18 Datum Method Forms
COMP or COMP4 COMP1 COMP2 COMP3 COMP5
Data Types
Display
INDEX
Alphabetic For example: PIC AAA Alphanumeric For example: PIC X9 Alphanumeric edited For example: PIC XB9 Numeric edited For example: PIC ZZZ99 DBCS For example PIC GGBGG External floating point For example: PIC +9V99E+99
String
String
String
String
String
String
byte[]
BigDecimal
29
Data Types
Display
INDEX
Numeric integer (9 digits or less) Numeric floating point (COMP-1 or COMP-2 items) Numeric Integer (10 to 18 digits) Numeric integer (19 digits or more)
int
int
BigDecimal
long
long
long
long
BigDecimal
Big Decimal
Big Decimal
Big Decimal
For repeating leaf nodes, these two alternative methods are provided: T getDatum(int i) void setDatum(int i, T) where i is expected to be a value from 0, representing the ordinal of the desired repetition instance, and where T is determined as previously described.
3.4.4
BPEL Operations
When using eInsight to process COBOL copybooks, the operations in Table are available. Table 19 BPEL COBOL Operations
eInsight Operation Marshal MarshalToBytes MarshalToString Unmarshal Activity Allows you to marshal an OTD instance to a string. Marshals an OTD instance (or OTD tree) to byte array using current encoding (CP037). Marshals an OTD instance (or OTD tree) to string using current encoding (CP037). This operation is retained for purposes of compatibility with the previous release of the COBOL Copybook Converter. The Unmarshal operation allows you to select unmarshaling from byte array or from string. Unmarshals data from byte array into an OTD instance. Unmarshals data from string into an OTD instance.
UnmarshalFromBytes UnmarshalFromString
30
Important: It is recommended that you use the Marshal and Unmarshal methods since they allow for more control over the output data. Both methods are available for purposes of increased compatibility.
31
Chapter 4
4.1
32
inputcobolJCD.txt.~in - The input file that the sample Project requires when it is deployed. COBOL_JCDoutput1.dat - The expected output when the Project is executed with the given input file. This sample Project converts EBCDIC input data to the format specified in the copybook. The input data is provided by a File eWay. This data is read into a COBOL Copybook OTD generated from the same copybook. The Collaboration shows the use of the COBOL Copybook OTD to retrieve the EBCDIC data as Java Strings for concatenation and forwards the output to an outbound File eWay. The resulting file output is the ASCII translation of the original input data. The prjCOBOL_BP_Sample sample Project provides an implementation of the COBOL Copybook Converter that uses BPEL functionality. The sample Project consists of the following: prjCOBOL_BP_Sample - The project that needs to be imported to your Enterprise Designer. qan3glr1.cobol - The COBOL copybook file used for the conversion to create the OTD. INPUTCOBOLbp.txt.~in - The input file that the sample project requires when it is run. COBOLBPoutput0.dat - The expected output when the Project is executed with the given input file. Each Project contains the following: Input data Connectivity Maps Collaborations Business Processes Version Support Consult the COBOL Copybook Converter Readme provided in the Converters SAR file for specific ESR requirements (if they exist) to import or run each of the sample Projects.
4.1.1
33
4.1.2
4.1.3
4.2
34
3 Browse to the directory that contains the sample Project ZIP file. Select the sample file and click Import. 4 Click Close after successfully importing the sample Project.
4.3
4.4
35
Chapter 4 Section 4.4 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_JCD_Sample Project
Creating the Deployment Profile on page 50 Creating and Starting the Domain on page 50 Building and Deploying the Project on page 51 Running the Sample on page 51
4.4.1
Creating a Project
The first step is to create a new Project in the Enterprise Designer. 1 Start the Enterprise Designer. 2 From the Project Explorer tree, right-click the Repository and select New Project. A new Project (Project1) appears on the Project Explorer tree. 3 Click twice on Project1 and rename the Project (for this sample, prjCOBOL_JCD_Sample).
4.4.2
36
Chapter 4 Section 4.4 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_JCD_Sample Project
3 Browse for the desired COBOL Copybook file and highlight it. 4 Click the Add button to include a copybook file in a project. 5 Repeat Steps 3 and 4 for each file to include in the project. To remove a copybook file from the project, highlight the file name in the Select Files container and click Remove. 6 Click Next. The Configure Converter Options page appears.
37
Chapter 4 Section 4.4 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_JCD_Sample Project
7 Optionally, add/remove checks from boxes to enable/disable options: Ignore copybook content beyond column 72 -- The Converter expects copybooks to be width-compliant with IBMs COBOL reference format. Uncheck this box to process books with content (excluding comments/line numbers) beyond column 72. Default: enabled (box is checked). Check Item names against reserved words -- The Converter disallows data item names that match reserved words. Uncheck this box to process copy books that use reserve words for item names. When name checking is disabled, the Converter cannot process copy books with unnamed items (i.e., implicit FILLER items). Default: enabled (box is checked). 8 Click Finish. The OTD Editor window appears, displaying the OTD.
4.4.3
38
Chapter 4 Section 4.4 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_JCD_Sample Project
4.4.4
39
Chapter 4 Section 4.4 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_JCD_Sample Project
3 Double-click Sun SeeBeyond and eWayscontinue to double-click to select the inbound eWay and the (inbound) web service. For example, for the a File eWay, double-click File, FileClient, and click receive as shown below. Figure 9 Selecting File Receive
4 Click Next. 5 Double-click Sun SeeBeyond, eWayscontinue to double-click to select the outbound eWay and the (outbound) web service. For example, for the File eWay, double-click File, and then FileClient. 6 In the Look In box, browse to the Project with the copybook file to be used for this conversion.
40
Chapter 4 Section 4.4 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_JCD_Sample Project
7 Double-click the copybook file. This adds the copybook file as shown below. Figure 10 Completed Collaboration Definition
8 Click Finish. The Collaboration Editor window appears. You can now create the business logic for the Collaboration as described below.
4.4.5
41
Chapter 4 Section 4.4 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_JCD_Sample Project
The Copy new ByteArrayInputStream(input.ByteArray) to variable byteStream Variable is displayed in Figure 12. Figure 12 prjCOBOL_JCD_Sample Business Rule 1
The Copy new SimpleOtdInputStreamImpl(byte Stream) to variable otdStream Variable is displayed in Figure 13.
42
Chapter 4 Section 4.4 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_JCD_Sample Project
The misc01a_1.unmarshal(otdStream) Business Rule is displayed in Figure 14. Figure 14 prjCOBOL_JCD_Sample Business Rule 3
43
Chapter 4 Section 4.4 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_JCD_Sample Project
The Copy FileClient_1.Text.concat(misc01a_1.FILLER_AND_NONAME_LEN224.FILLER_LEN 34) to FileClient_1.Text Business Rule is displayed in Figure 16. Figure 16 prjCOBOL_JCD_Sample Business Rule 5
44
Chapter 4 Section 4.4 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_JCD_Sample Project
The FileClient_1.write Business Rule is displayed in Figure 18. Figure 18 prjCOBOL_JCD_Sample Business Rule 7
45
Chapter 4 Section 4.4 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_JCD_Sample Project
public void receive( com.stc.connector.appconn.file.FileTextMessage input, com.stc.connector.appconn.file.FileApplication FileClient_1, Misc01a.Misc01a_Tree misc01a_1 ) throws Throwable { // @map:java.io.ByteArrayInputStream byteStream = new java.io.ByteArrayInputStream( input.getByteArray() ); java.io.ByteArrayInputStream byteStream = new java.io.ByteArrayInputStream( input.getByteArray() ); // @map:com.stc.otd.runtime.OtdInputStream otdStream = new com.stc.otd.runtime.provider.SimpleOtdInputStreamImpl( byteStream ); com.stc.otd.runtime.OtdInputStream otdStream = new com.stc.otd.runtime.provider.SimpleOtdInputStreamImpl( byteStream ); // misc01a_1.unmarshal(otdStream) misc01a_1.unmarshal( otdStream ); // Copy FILLER1 to Text FileClient_1.setText( misc01a_1.getFILLER_AND_NONAME_LEN224().getFILLER1() ); // Copy Text.concat(FILLER_LEN34) to Text FileClient_1.setText( FileClient_1.getText().concat( misc01a_1.getFILLER_AND_NONAME_LEN224().getFILLER_LEN34() ) ); // Copy Text.concat(BLANK1) to Text FileClient_1.setText( FileClient_1.getText().concat( misc01a_1.getFILLER_AND_NONAME_LEN224().getBLANK1() ) ); // FileClient_1.write FileClient_1.write(); } } 4.4.6
46
Chapter 4 Section 4.4 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_JCD_Sample Project
6 From the jcdCOBOL Binding dialog box, map FileClient_1 to the FileClientOUT External Application, as seen in Figure 19. Figure 19 Connectivity Map - Associating (Binding) the Projects Components
7 Minimize the jcdCOBOL Binding dialog box by clicking the chevrons in the upperright corner. 8 Save your current changes to the Repository.
4.4.7
Creating an Environment
Environments include the external systems, Logical Hosts, Integration Servers and message servers used by a Project and contain the configuration information for these components. Environments are created using the Enterprise Designers Environment Editor. Steps required to create an Environment: 1 From the Enterprise Designers Enterprise Explorer, click the Environment Explorer tab. 2 Right-click the Repository and select New Environment. A new Environment is added to the Environment Explorer tree. 3 Rename the new Environment to envCOBOLProj. 4 Right-click envCOBOLProj and select New > File External System. Name the External System esFileClient. Click OK. esFileClient is added to the Environment Editor. 5 Right-click envCOBOLProj and select New > Logical Host. The LogicalHost1 box is added to the Environment and LogicalHost1 is added to the Environment Editor tree.
47
Chapter 4 Section 4.4 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_JCD_Sample Project
6 Right-click LogicalHost1 and select New > Sun SeeBeyond Integration Server. A new Integration Server (IntegrationSvr1) is added to the Environment Explorer tree under LogicalHost1. See Figure 20. Figure 20 Environment Editor - envCOBOLProj
FileClientOUT eWay
48
Chapter 4 Section 4.4 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_JCD_Sample Project
Directory
49
Chapter 4 Section 4.4 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_JCD_Sample Project
4.4.9
4.4.10
50
Chapter 4 Section 4.4 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_JCD_Sample Project
4 If there are no existing domains, a dialog box indicates that you can create a domain now. Click Yes. The Create Domain dialog box appears. 5 Make any necessary changes to the Create Domain dialog box and click Create. The new domain is added to the Domain Manager. Select the domain and click the Start an Existing Domain button. Once your domain is started, a green check mark indicates that the domain is running. For more information about creating and managing domains see the eGate Integrator System Administration Guide.
4.4.11
4.4.12
51
Chapter 4 Section 4.5 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_BP_Sample Project
4.5
4.5.1
Creating a Project
The first step is to create a new Project in the Enterprise Designer. 1 Start the Enterprise Designer. 2 From the Project Explorer tree, right-click the Repository and select New Project. A new Project (Project1) appears on the Project Explorer tree. 3 Click twice on Project1 and rename the Project (for this sample, prjCOBOL_BP_Sample).
4.5.2
52
Chapter 4 Section 4.5 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_BP_Sample Project
3 Browse for the desired COBOL Copybook file and highlight it. 4 Click the Add button to include a copybook file in a project. 5 Repeat Steps 3 and 4 for each file to include in the project. To remove a copybook file from the project, highlight the file name in the Select Files container and click Remove. 6 Click Next. The Configure Converter Options page appears.
53
Chapter 4 Section 4.5 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_BP_Sample Project
7 Optionally, add/remove checks from boxes to enable/disable options: Ignore copybook content beyond column 72 -- The Converter expects copybooks to be width-compliant with IBMs COBOL reference format. Uncheck this box to process books with content (excluding comments/line numbers) beyond column 72. Default: enabled (box is checked). Check Item names against reserved words -- The Converter disallows data item names that match reserved words. Uncheck this box to process copy books that use reserve words for item names. When name checking is disabled, the Converter cannot process copy books with unnamed items (i.e., implicit FILLER items). Default: enabled (box is checked). 8 Click Finish. The OTD Editor window appears, displaying the OTD.
4.5.3
54
Chapter 4 Section 4.5 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_BP_Sample Project
Steps to create a business process flow include: 1 Right-click your new Project in the Enterprise Designers Project Explorer, and select New > Business Process from the shortcut menu. The eInsight Business Process Designer appears and BusinessProcess1 is added to the Project Explorer tree. Rename BusinessProcess1 to BP1. 2 Add the following activities to the Business Process Designer canvas. Table 21 Business Process Activities
Business Process BP1 FileClient.Receive qan3glr1.unmarshal FileClient.Write Activity
Steps required to configure the BP1 business process: 1 Configure the business rule between the FileClient.receive and qan3glr1 Activities, as seen in Figure 26.
55
Chapter 4 Section 4.5 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_BP_Sample Project
2 Configure the business rule between the qan3glr1 and FileClient.write Activities, as seen in Figure 27. Figure 27 prjCOBOL_BP_Sample Business Rule 2
4.5.4
56
Chapter 4 Section 4.5 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_BP_Sample Project
To Select a COBOL Business Process 1 Drag a business process from the Enterprise Explorer Project Explorer onto the corresponding Connectivity Map. For example, drag the BP1 business process onto the cmCOBOL_BP Connectivity Map. 2 Save your changes to the Repository
57
Chapter 4 Section 4.5 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_BP_Sample Project
3 Double-click the BP_COBOL Service. The BP_COBOL Binding dialog box appears. 4 Map the input FileClient (under Implemented Services) to the FileClientIN (File) External Application. To do this, click on FileSender in the BP_COBOL Binding dialog box, and drag the cursor to the FileClientIN External Application in the Connectivity Map. A link is now visible between FileClientIN and eaFileIn. 5 From the BP_COBOL Binding dialog box, map qan3glr1 (under Invoked Services) to the eaFileOut External Application. 6 From the BP_COBOL Binding dialog box, map FileClient_1 to the FileClientOUT External Application, as seen in Figure 29.
7 Minimize the BP_COBOL Binding dialog box by clicking the chevrons in the upper-right corner. 8 Save your current changes to the Repository.
4.5.5
Creating an Environment
Environments include the external systems, Logical Hosts, Integration Servers and message servers used by a Project and contain the configuration information for these components. Environments are created using the Enterprise Designers Environment Editor. Steps required to create an Environment: 1 From the Enterprise Designers Enterprise Explorer, click the Environment Explorer tab. 2 Right-click the Repository and select New Environment. A new Environment is added to the Environment Explorer tree. 3 Rename the new Environment to envCOBOLProj.
58
Chapter 4 Section 4.5 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_BP_Sample Project
4 Right-click envCOBOLProj and select New > File External System. Name the External System esFileClient. Click OK. esFileClient is added to the Environment Editor. 5 Right-click envCOBOLProj and select New > Logical Host. The LogicalHost1 box is added to the Environment and LogicalHost1 is added to the Environment Editor tree. 6 Right-click LogicalHost1 and select New > Sun SeeBeyond Integration Server. A new Integration Server (IntegrationSvr1) is added to the Environment Explorer tree under LogicalHost1. See Figure 30. Figure 30 Environment Editor - envCOBOLProj
59
Chapter 4 Section 4.5 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_BP_Sample Project
FileClientOUT eWay
Directory
60
Chapter 4 Section 4.5 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_BP_Sample Project
61
Chapter 4 Section 4.5 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_BP_Sample Project
4.5.8
4.5.9
62
Chapter 4 Section 4.5 Implementing the COBOL Copybook Converter Sample Projects Building, Deploying, and Running the prjCOBOL_BP_Sample Project
4.5.10
63
Appendix A
Does the Converter support COMP fields? Does the Converter support copy statements within the copybook? What is the limitation with edited field?
64
Section
Would the OTD Tester work with ASCII data? Is there any limitation with the OTD Tester? How does padding work?
Can the Converter parse a COBOL program and just pick up the copybook from there? How does the Converter handle poor performance if the copybook is too big?
Does the COBOL Copybook Converter support leading and trailing SIGN clauses?
Is there any limit to the size of the data element? Does the Converter support truncation if the field is longer than the one in the copybook?
65
Index
Index
A
Automap 50, 61
J
Java methods 20 Javadocs, installing 13
M
marshal() 22 marshal(OtdOutputStream out) 24 marshal(OtdOutputStream out, String charset) 24 marshal(OtdOutputStream) 24 marshal(String charset) 23 marshalToString 25 marshalToString() 25 methods 20 migration procedures 13
B
binding dialog box 47, 58
C
CICS 7 COMM AREA 7 Cobol Copy statements 8 COBOL eWay Project eInsight and eGate components 34 running sample projects 63 Collaboration editor 39 COMM AREA 7 conventions, text 9 converter methods 20 Copybooks about 6
O
OTD Interpretation 20 OTD method guidelines 20
P
PIC X(4) 8
R
reset() 25 resetHigh() 25 resetLow() 26 retrieveEncoding() 26
D
Deployment Profile Automap 50, 61
S
sample projects, installing 13 statements Cobol Copy 8 usage pointer 8 supporting documents 10 Sybase eWay Project running sample projects 51
E
Encoding Behaviour 20
G
guidelines OTD methods 20
T I
in) 26 in, String charset) 27 Installing migration procedures 13 text conventions 9
U
unmarshal(OtdInputStream in) 26
66
Index
unmarshal(OtdInputStream in, String charset) 27 unmarshalFromString(String in) 28 unsupported features 8 usage pointer statements 8 useEncoding(String enc) 28
67