BEA Logo BEA WebLogic Java Adapter for Mainframe 5.0

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   WebLogic Java Adapter for Mainframe Documentation   |   WebLogic Java Adapter for Mainframe Programming Guide   |   Previous Topic   |   Next Topic   |   Contents   |   Index

eGen Application Generator Reference

 

This section contains reference pages for the WebLogic JAM eGen Application Generator (eGen utility). This information includes the rules for writing the script file that controls the code generator.

 


Synopsis

The eGen utility maps a COBOL copybook into a Java class.

Invoke the utility with the following command:

java com.bea.jam.egen.EgenCobol scriptfile

where:

java

is the name of the Java virtual machine executable in the Java Development Kit (JDK).

com.bea.jam.egen.EgenCobol

is the full class name of the eGen utility.

scriptfile

is the script file that controls the eGen utility. You must write this script file on an application-by-application basis. (See ListingB-1 for an example).

If the WebLogic JAM installation bin directory has been added to your path, the eGen utility may also be invoked with the following command:

egencobol scriptfile

Listing B-1 Example of scriptfile.egen

### example script
#

view demo.CustomDataView from emprec.cpy

service demoService accepts CustomDataView returns CustomDataView

page demoPage "Demo Page"
{
view demo.CustomDataView

buttons
{
"Try It" service(demoService) shows demoPage
}
}

servlet demo.DemoServlet shows demoPage

 


Script Syntax Reserved Words

The reserved words shown below must be used as specified in the Grammar section.

Note: A reserved word can be used as an identifier if it is enclosed in either single or double quotation marks (refer to General Rules).

accepts

buttons

class

client

codepage

ejb

from

generate

group

is

method

page

reset

returns

server

service

servlet

shows

support

view

transaction

xml




 

 


General Rules

 


Grammar

The eGen script grammar uses a modified Backus-Naur Form (BNF) syntax, which is used in many industry-standard software reference guides. BNF syntax specifies a context-free grammar. Reserved words are shown in bold. Comments are in italics preceded by a dash (—).

script:

definition | script definition

fulldefinition:

generate definition | definition

definition:

viewdef | servicedef | servletdef | ejbdef | classdef | pagedef

viewdef:

view viewname from copybook | viewdf viewmodifier

viewmodifier:

codepage codepagename | support xml

servicedef:

service servicename accepts fullViewname returns fullViewname

servletdef:

servlet classname shows pagename

ejbdef:

clientejb | serverejb

clientejb:

client ejb classname ejbspec { clientmethods }

serverejb:

server ejb classname ejbspec { servermethoddef }

classdef:

client class classname { clientmethods }

ejbspec:

ejbregistration | ejbregistration transactiondef

transactiondef:

transaction [NotSupported | Required | Supports | RequiresNew | Mandatory | Never]

pagedef:

page pagename title { view viewname buttons { buttonlist } }

buttonlist:

buttondef | buttonlist buttondef

buttondef:

servicebutton | ejbbutton

clientmethods:

clientmethoddef | clientmethods clientmethoddef

clientmethoddef:

method methodname is servicename

servermethoddef:
method methodname (fullviewname) returns fullviewname

servicebutton:

buttonname service ( servicename ) shows pagename

ejbbutton:

buttonname ejbmethod ( ) shows pagename

viewname:

classname

fullViewname:

viewname | viewname [ codepagename ]

copybook:

identifier

—An identifier that names a file containing a COBOL data definition.

servicename:

identifier

—An identifier that matches a resource definition in your jcrmgw.cfg file

pagename:

identifier

—An identifier that names a page definition.

codepagename:

identifier

—The name of a codepage to be used for character translation to/from mainframe data formats. This must be a codepage supported by the JDK being used.

methodname:

identifier

—The name to be given to a generated Java method.

classname:

identifier

—An identifier that names a Java class, including any package name.

ejbregistration:

identifier

—The name that will be used to register the home interface for an EJB.

title:

identifier

—The title to be placed into the HTML generated for a page.

buttonname:

identifier

—A button name that will be used in the HTML generated for a page.

ejbmethod:

identifier

—An EJB classname and method specification that should look like this:

package.ejbclass.method

or

ejbclass.method

 


Results of Running the eGen Application Generator

 

back to top previous page next page