Sunteți pe pagina 1din 36

Global Advanced Technology Services

Technology

Submitting Reports with


The RUNUBEXML Program
Paper

Technology Demographic Table


Product OneWorld, XE, ERP8, ERP9

Version SP19 and higher

Platform/OS Windows2000, UNIX

Industry

Application Reports, Batches, UBEs

Database

Keywords Batch jobs, reports, UBE, parallel batches

Date May 20, 2003

Authors Phil Kemp

THIS PUBLICATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
This publication could include technical inaccuracies or typographical errors. This publication does
not make recommendations, implied or actual. It provides guidelines; however, due the wide
variety of networking, hardware and software configurations found in OneWorld installations, no
guarantees can be made that specific results are achievable in any particular installation. Changes
are periodically added to the information herein. These changes will be incorporated in new
editions of the publication. J.D. Edwards may make improvements and/or changes at any time to
the product(s) and/or the program(s) described in this publication.

 J.D. Edwards World Solutions Company. All Rights Reserved


Contents
INTRODUCTION............................................................................................................................................1
FEATURES......................................................................................................................................................1
USING RUNUBEXML...................................................................................................................................2
NECESSARY BASICS...................................................................................................................................2
SYSTEM, BIN32 DIRECTORY..........................................................................................................................2
COMPUTER ID & REPORT ID.........................................................................................................................3
EDITING & ERRORS IN XML DOCUMENTS....................................................................................................3
RUNUBEXML & RUNUBE DIFFERENCES.............................................................................................4
JOB ID...........................................................................................................................................................4
RUNUBE INTERACTIVE MODE.....................................................................................................................4
SECURITY.......................................................................................................................................................5
RUNNING RUNUBEXML............................................................................................................................5
RUNUBEXML FLOW...................................................................................................................................7
GENERATE BASE XML (STEP 1)...............................................................................................................8
REQUIRED VALUES........................................................................................................................................9
OPTIONAL INFORMATION...............................................................................................................................9
BUILD REQUEST XML (STEP 2).............................................................................................................10
SUBMIT REPORT XML (STEP 3).............................................................................................................11
JDE BUSINESS VIEWS...............................................................................................................................11
JDE PRINTER INFORMATION................................................................................................................12
DATA SELECTION......................................................................................................................................12
DATA SEQUENCING..................................................................................................................................17
APPENDIX – BASE XML FILE.................................................................................................................19
RAW BASE XML FILE.................................................................................................................................19
EDITED BASE XML FILE.............................................................................................................................19
APPENDIX – REQUEST XML FILE.........................................................................................................21
APPENDIX – OUTPUT XML FILE...........................................................................................................23
APPENDIX - WINDOWS2000 PATH.........................................................................................................26
WINDOWS2000 ENVIRONMENT PATHS........................................................................................................26
Checking Windows2000 Environment Paths..........................................................................................26
Setting directory paths............................................................................................................................26
APPENDIX - COMMON ERRORS...........................................................................................................29
INCORRECT REPORT ID & INCORRECT PASSWORD.....................................................................................29
BAD XML FILE............................................................................................................................................29
INVALID REPORT NAME................................................................................................................................29
INVALID REPORT VERSION............................................................................................................................29
CREATE_XML ARGUMENT MUST BE IN CAPTIALS................................................................................30
WINDOWS2000 ENVIRONMENT PATH NOT SET..........................................................................................30
FIRST ARGUMENT NOT “G” OR “S”............................................................................................................30
NO ARGUMENTS..........................................................................................................................................31
BAD CREATE_XML ARGUMENT...............................................................................................................31
BAD FILE EXTENSIONS................................................................................................................................31
FIRST XML FILE DOESN’T EXIST...............................................................................................................31
Process <runubexml> could not be registered............................................................................................32
Global Advanced Technology Services

Introduction
The purpose of the paper is to provide documentation about
how to run repots with the JDE ERP runubexml command. The
paper explains the runubexml command, features, and give
examples of how to use it. The information is intended for
technical people who may have a need for command line
execution of JDE reports or batches on an Enterprise Server.
The command is also useful and important to customers who
have the need to integrate JDE reporting with a production
batch control system.
The runubexml program is another method for submitting batch
jobs. It does not change or improve a reports performance.
Existing jobs that work with the runube program should also
work with runubexml.
The runubexml command was introduced with JDE OneWorld,
SP17. However, there were issues found, and now with Service
Pack 19 the command is reliable.
The paper’s focus is on the use of the command on UNIX and
Windows based Enterprise Servers and UBE Servers. The
runubexml command is also available on AS400 Enterprise
Servers, but is not discussed in this paper.
Throughout the paper examples from the address book report,
R014021 are used. This report was chosen because of its
simplicity, and because it was a non-updating report.
Demonstration data was used for the data set.

Features
The most unique, useful feature of runubexml is that XML
documents are used to set report options and retrieve status
information. This is a major advancement for JDE reporting.
Before the command, this information was not easily
accessible. Custom reports, programs and queries typically had
to be developed to set report options and to get status
information. Often these custom solutions are not flexible, and
only work for a few specific reports. Runubexml offers a more
general solution.
The runubexml XML documents can control or set the same
common options that an interactive client does during a batch
submission. The major controls that are now available are data
selection and data sequencing. Data selection values can be
directly manipulated in a XML document by an external
program or an XML editor. This is the first time that this can be
done outside of JDE ERP. Potentially, this means that reports
can be dynamic in their data selection. For parallel or multi-
threaded reports, this can mean better load balancing, or an
even distribution data across the simultaneous reports.
The runubexml program also means there is production solution
for parallelizing GL Post reports. The current approach requires
either a manual interactive process, which is prone to errors, or
custom development. One of the main data selections for the
Post report is the GL Batch Number, which is a dynamic,

Page 1
changing, internally generated number. It is held in a database
table. With a simple query along with runubexml, a production
solution can be created.
Another feature that is available for the first time is the Job ID
of the batch. A Job ID is critical for seeing the status of a
report from an external program. It is also useful when a
series of reports have dependencies. Many times a certain
report must finish before other reports can be run. With a Job
ID, a program can check if a specific report is still running or is
finished and then proceed to the dependent batches.
For UNIX, another benefit of runubexml over runube is the user
ID and password is in the XML file. With implementations that
use runube, it is possible to see IDs and passwords with the
UNIX “ps” command. The security risk goes away with
runubexml.
In summary the main features and capabilities of the
runubexml program are:
 External program control of data selection.
 Exposure of report Job ID.
 Hide report user ID and password.
 Direct manipulation of data sequencing values.
 Program control of UBE jde logging.
 Program control of UBE debug.

Using runubexml
The runubexml program or command submits a report to a
batch or enterprise server just like any other batch submission
process. The one exception is runube with “Interactive” switch
options. Please see the section RunubeXML and Runube
Differences for an explanation.
The runubexml program will use the same internal JDE
processes as runube or an interactively submit job. It will use
the UBE Kernel (Kernel 2). The status is kept in the Job Master
table and can be seen in the Submitted Reports application.
The same PDF output and the optional CSV output will be
produced. It will also create Work Center messages, which are
useful in checking the success of the batch. Finally, the report
will be executed by the runbatch program at the operating
system level.
While the internal processes and the system effects of running
a batch with runubexml remain the same, the submission steps
and setting report options are different.

Necessary Basics
The runubexml program is executed in a command window.
The program is found on the server in the JDE system, bin32
directory.

System, Bin32 Directory


The best way to first test the command is to execute the
command in the system, bin32 directory. Once you are

Page 2
satisfied that the command works, a Windows PATH or a UNIX
ENV setting can be made, so the command can be executed in
another directory. When executing runubexml program, the
XML documents will be put in the directory or path that you
execute the program in.
GOOD PRACTICE - It is a good practice not to put
user files and user programs in the JDE system,
bin32 directory. There are essential programs for
JDE in this directory. Accidentally, if the
standard files are corrupted, damaged or deleted,
then the JDE ERP system will not work properly.
To repair these inadvertent changes, the original
file may have to be restored from the installation
CDs.
To execute the runubexml program in another directory besides
the bin32 directory, the Windows path or UNIX env setting may
have to be changed. On the server, the Windows PATH or UNIX
ENV must point to the JDE directories:
 bin32
 lib32
 libv32
All of the above directories are necessary to run the program in
another directory besides the system, bin32 directory. The
XML documents will be put in the directory where the
runubexml program is executed. In Appendix – Windows2000
Path, there are instructions on how to set the Windows
environment. In UNIX, the “.profile” or “.oneworld” file is
modified to include the directory path for the env variable.

Computer ID & Report ID


Another simple but extremely important detail is the computer
Login ID, and the JDE ERP ID. The computer Login ID runs the
runubexml commands, while the JDE ERP ID is the one this
used in the XML files.
The computer Login ID is usually the ID that starts JDE
services. The reason for this is that the ID has all the
permissions for the system and bin32 directories. If another
computer ID is used, then the ID must have all the read, write,
and execution permissions as the JDE ID. On UNIX, the
computer ID will be something like jde7333 or jde7334.
The Report ID that is used in the base XML document is any
valid JDE ERP ID. The report ID can be different from the
computer login ID, but it does not have to be. Throughout the
examples in the paper the JDE ID was used and the computer
login ID was also JDE. If JDE ERP security has been setup for a
report user ID, then it will still be in effect when using the
runubexml program.

Editing & Errors in XML Documents


XML documents or files are text files. They are similar to HTML
files in that there is a grammar with starting tag and ending
tag, and have a specific structure. JD Edwards has created
custom tags to work with the runubexml program.

Page 3
When testing, a standard editor like vi or notepad can be
carefully used to set values. However, in production it is
strongly recommended that an XML editor or a programming
language be used.
GOOD PRACTICE – In a production environment, use a
XML editor or a programming language to change XML
documents. Manual changes should only be done for
testing purposes only. Manual changes for a production
solution are prone to error and can produce inconsistent
results.
Each of the runubexml execution steps parses the input XML
file. If the XML file has been changed incorrectly or the syntax
has been accidentally destroyed, then the runubexml program
will not work.
For example, when a bad version name or wrong version name
is entered in the base XML document, an error message will be
in the request XML document. Many times the error can simply
be corrected, and then repeat the execution step again. Some
of the typical mistakes are described in Appendix – Common
Errors.
GOOD PRACTICE - When using runubexml in a script, it
good practice to manually scan each resulting XML file for
error messages.

Runubexml & Runube Differences


Prior to runubexml, the command line program, runube, was
used with batch schedulers and with custom script submission
processes. Besides the tremendous benefit of externalizing
report options in XML files, the runubexml has another major
difference from the runube program. It externalizes the JDE
JOB ID.

Job ID
This is an important difference, the JOB ID has to be use to see
if the report has completed. The runube program does not
have the functionality to return the JOB ID.
For developers adapting existing runube production scripts that
use runube with its “Interactive” option, they will have to poll
the Job Master table or the operating system to find the
report’s status.
NOTE: Excessive polling of the F986110 table
can affect overall batch performance and can
cause a high number of database table locks.

RUNUBE Interactive Mode


In many controlling scripts, runube is used with the
“Interactive” option. It has the effect of pausing in the script
until the report has completed execution. It makes script
development easy, since the script waits, and no testing has to
be done for report completion.

Page 4
While this is a useful feature for scripting, there is inherent risk
with the “Interactive” option. The risk is that all the governing
mechanisms, the limits setup up in the jde.ini file (Kernel 2
processes and Job Queues) are bypassed with the “Interactive”
option. This means that if the runube command is submitted
over and over again, the report will run as many times as it
was submitted without any limitations. There is a potential that
the Enterprise Server or batch server resource could be totally
consumed.
The runubexml program does not have the equivalent
“Interactive” feature. It processes report like runube does with
the “Batch” option. This means that runubexml batch scripts
must test for report or job completion. This difference will have
an impact on scripts that chain multiple reports together.
However, runubexml does make it easy to test for report
completion by giving the report JOB ID in the output XML file.
With the runube command, there is not a way to get a specific
reports ID without custom development. With runubexml, the
JOB ID given in the output XML file, which then can be used to
lookup the report’s specific computer process ID. A program
can then be used to poll the Job Master table, F986110, for
report completion.

Security
Another benefit of runubexml over runube is that JDE ERP IDs
and passwords cannot be seen in the process information of
UNIX. If the runube program is being used, a simple “ps” can
show the ID and password. With runubexml the ID and
password are not visible because they are in the base XML file.

Running RUNUBEXML
To execute the runubexml program is quite easy. There are
only three steps. The XML documents details and settings are
more complex. A few key elements in the XML documents
need to be understood to be successful with the program. The
main XML elements will be described in later sections.
There are three possible steps for the runubexml program
executing in a command line window on the Enterprise Server
or Batch Server. The first step creates a generic template or a
base file. The file must be changed to specify a valid JDE ERP
ID, password, environment, report name, and report version.
Other informational options can also be set in the base file.
The second step generates a report request file. The request
file also has optional steps like data selection and logging. The
last step submits the request XML file and runs the report on
the server, and also produces an output file that has the JOB
ID.
The command line syntax of the three steps is:

1) runubexml G CREATE_XML base.xml


2) runubexml S base.xml report_request.xml
3) runubexml S report_request.xml output_name.xml

Page 5
Where the syntax for the above commands is:
 The text in bold is required, and is case
sensitive.
 The italicized xml file names are arbitrary.
They can be called anything as long as the
name portion conforms to the naming
standards of the operating system.
 All of the XML files must have an “xml”
extension.

TIP – For UNIX users, it is normal to use a minus sign,


“-“, before command line switches. Please note, there
are NO MINUS SIGNS is the command line options of
runubexml.

Between each of the above steps, certain actions can be done.


From a production viewpoint, if there are no changes to data
selection or other reporting options, then Step 1 and Step 2
only need to be done once,. Step 3 would be done repeatedly
to execute the production report.
A more complex production execution scenario would occur if
data selection is dynamically set each time for a report. In this
case, the report request XML file would be changed each time
for the data selection, and then Step 3 would be done.

Page 6
Runubexml Flow
Runubexml uses XML documents. It is in the XML documents
where data selection can be changed, where the batch Job ID is
exposed, and where other features can be used. In the figure
below the three command steps are given along with output
files and edit points:

runubexml Flow

Processes & Results XML Commands & File Changes

Create
base runubexml G CREATE_XML base.xml
Step 1 XML
OPTIONAL
Create base Edits
xml document base Login Information
XML Report Information
file [Business View columns]
(base.xml) [Printer Information]

Build
XML batch runubexml S base.xml request.xml
Step 2 request
Build xml
request
document OPTIONAL Edits
batch
[Data selection]
XML
[Data sequencing]
file
[UBE jde log]
(request.xml)
[UBE debug log]
[Form Interconnection]
[CSV output]

Step 3
Execute
Submit the RunBatch
job runubexml S request.xml result.xml

batch
**NOTE:
status
The OneWorld batch JOB ID is in the result.xml file. With
XML
the JOB ID, the operating system process ID (of runbatch)
file
can be looked up in the F986110, Job Master table. The
(result.xml)
execution status of the batch can be determined with the
process ID.

Results PrintQueue
results
batch PDF
[batch log]
[batch debug]

Page 7
Generate Base XML (Step 1)
The first step generates (G) a generic XML template. The
generic or base XML file needs to be changed before executing
Step 2. The basic, required information that is needed is: a
valid JDE ERP ID, password, environment, report name, and
report version.
The base XML template can be used over and over again by
changing the report information, (and possibly the User ID). It
does not have to be created every time. However, it is does
not hurt to have multiple base files. It really depends on the
implementation and production style.
A sample of a raw and edited base XML documents can be
found in Appendix – Base XML File. An annotated base XML file
is below, which highlights the required changes and optional
changes:
Annotated Base XML
Line Base XML File Values Notes
1 <jdeRequest type=”ube” user=” JDE login ID” Login name REQUIRED
2 pwd=” JDE password” Login REQUIRED
password
3 environment=” JDE environment”> Environment REQUIRED
4 <ACTION TYPE="CREATE_XML” DO NOT
5 TEMPLATE_TYPE=”LAUNCH_REPORT”> … CHANGE
6 <REPORT_NAME VALUE="JDE report "/> Report name REQUIRED
(10 character
limit)
7 <REPORT_VERSION VALUE=”JDE version”/> Report REQUIRED
version (10 character
limit)
8 <JARGON_SYSTEM_CODE VALUE=”0”|”1”/> 0 or 1 Default 1
9 <COMMENTS VALUE=”0”|”1”/> 0 or 1 Default 1
10 <DATA_TYPING VALUE=”0”|”1”/> 0 or 1 Default 1
11 <BUSINESS_VIEW VALUE=”0”|”1”/> 0 or 1 Default 0
12 <PRINTER_INFORMATION VALUE=”0”|”1”/> 0 or 1 Default 0
13 <POPULATED VALUE=”0”|”1”/> 0 or 1 Default 1
14 </ACTION> DO NOT
15 </jdeRequest> CHANGE

Page 8
Required Values
The values that need to be changed are highlighted in the
above table. A description of the required changes is as
follows:
Required Base XML Fields
Required Field Value
User (Line 1) The JDE ERP ID. This is any valid JDE ERP ID.
Pwd (Line 2) The JDE ERP ID password.
environment Valid ERP environment (i.e. PY7333, PD7333).
REPORT_NAME (Line 6) This is the report name that will be run. For
example, this could be R014021 R09841, etc.
REPORT_VERSION (Line 7) This is the version of the report that will be run.
(Starting in JDE ERP9, there will be another require field. A
Role must be entered for the JDE ERP ID.) All of the above
values are needed.
For testing, it is best to start by submitting the report to a
server from a client workstation. You can make sure the report
works for the user ID, environment, report number and
version. Afterward, the report can be tried with runubexml.

Optional Information
The optional values of the base XML file are sometimes useful
when testing the runubexml program, and when developing
programs. The results of the optional settings from the base
XML file are found in the request XML file.
The optional values do not change the report or its execution.
They only produce information. Once in production, it is
unlikely that the extra information is needed or would be
useful.
One most useful optional setting is BUSINESS_VIEW. When
the business view option is set (Line 11 in the above table), all
of the available JDE Business View columns for the report are
displayed in the request XML file. This is useful for determining
what data selection is possible. Also, the business view
columns are in the correct format or syntax to be used as an
operand in the data selection and data sequence report options
in the request XML file. In the Business Views Section, an
example is given of the business view output.
Another result from a Step 1 option that sometimes is useful is
for printer information. By setting the value to “1”, information
about the JDE defined printer on the server is displayed in the
request XML file. Default is no printer information or OFF. An
example of printer information can be found in Printer
Information Section.
The remaining options in the base XML file are usually kept at
their default values.

Page 9
Build Request XML (Step 2)
In Step 2, the base XML document from Step 1 is submitted (S)
to the server to create the request XML document. Once the
report’s request XML file is created, optional changes like data
selection can be done. If there are no changes, then, the file
can be sent to the server and the report is executed, Step 3.
Similar to the base XML file, there are some optional settings in
the request XML document. Some of the useful report and
information options are:
 Data Selection
 Data Sequencing
 JDE logging
 JDE UBE debug
 Print Immediate
 Create comma delimited output file
The details of data selection and data sequencing are described
below in their own section.
Optional information set in Step 1, like business view details
and printer information, will be displayed in the request XML
file.
In the request XML file, there are ADVANCED_OPTIONS
settings. The following options can be set and are useful for
debugging and for controlling the output:

Advanced Option Default Description


JDELOG 0 With a value of “1”, it will create a jde log
file in the PrintQueue directory. This is
useful to verify the success of the report’s
technical processes.
JDEDEBUGLOG 0 Values can ranges from 0 to 6. This setting
is the equivalent to UBE debug. With a
value of “6”, the most information will be
generated. With the value of 0, UBE debug
is off. The debug log file will be created in
the PrintQueue directory. The setting can
be used to debug a report. However, it
may make more sense to run the report
interactive for debug purposes.
PRINT_IMMEDIATE 0 With a value of “1”, the finished report PDF
file is sent to the printer. This is the same
option that is available with the runube
command.
CREATE_CSV 0 With a value of “1”, a Comma Separated
Delimited file is created in the PrintQueue
directory, as well as, a PDF report file.

Page 10
Submit Report XML (Step 3)
The final action in the runubexml batch process is to submit the
request XML document to the server. This action will run the
report. Prior to this step, the request XML document would
have generated, and options would have set or unset. An
output XML file will be created, once Step 3 has been executed.
From a production and development viewpoint, the most useful
information in the output file is the JDE Job ID. The job ID is
found in the ACTION section of the output XML file. An
example is:
<JOBID VALUE="127" />
The output file will not give the job status (wait, in queue,
processing, error, done). However, with a program, the Job ID
can be used to lookup the runbatch process ID of the operating
system. This done by a query to the server’s Job Master table,
F986110. With runbatch process ID, an external program can
tell when the batch has finished. A subsequent query to the
Job Master table for the job status can tell if the batch finished
without errors or has errors.
Please note that the job status of “Done” or “D” in the Job
Master table means that the runbatch process ran successfully.
It does not mean that the report worked logically or the way it
was intended. For example, a done status is created when
there has been no data selected. Subsequent tests and queries
have to be done to verify the logical, functional success of the
batch. Discussions of these verifications are outside the scope
of the paper.
An example of the output XML document can be found in
Appendix – Output XML Document.

JDE Business Views


A useful optional setting is BUSINESS_VIEW in the base XML
document. When the business view option is set, all of the
available JDE Business View columns for the report are
displayed in the request XML file. This is useful for determining
what data selection is possible. The business view columns are
in the correct format or syntax to be used as an operand in the
XML data selection and data sequence sections.
The business view columns for the example report, R014021,
are displayed in the XML <BUSINESS_VIEW> section. An
example follows:

Page 11
<COLUMN NAME="Address Number" ALIAS="AN8" TABLE="F0101"
INSTANCE="0" />
<COLUMN NAME="Alpha Name" ALIAS="ALPH" TABLE="F0101"
INSTANCE="0" />
<COLUMN NAME="Business Unit" ALIAS="MCU" TABLE="F0101"
INSTANCE="0" />
<COLUMN NAME="Search Type" ALIAS="AT1" TABLE="F0101"
INSTANCE="0" />
<COLUMN NAME="Start Effective Date" ALIAS="EFTB" TABLE="F0101"
INSTANCE="0" />
<COLUMN NAME="Description - Compressed" ALIAS="DC"
TABLE="F0101" INSTANCE="0" />

To see the business view columns, the option must be set to


BUSINESS_VIEW VALUE=”1” in the base XML document. It is
turned off by setting the value to 0, which is the default value.

JDE Printer Information


In the base XML document printer information can be obtained
by setting the PRINTER_INFORMATION VALUE to “1”. Default is no
printer information or OFF.
An example of printer information is found in request XML file:
<PRINTER_NAME VALUE="JDELaser Postscript NT" />
<NUMBER_OF_COPIES VALUE="1" />
<PAPER_SOURCE VALUE="1" />
- <CONVERSION_FILTER TYPE="PS">
- <NON_LP>
<PAPERTYPE VALUE="LETTER" />
<PAGEWIDTH VALUE="0" />
<PAGEHEIGHT VALUE="0" />
<ORIENTATION VALUE="0" />
</NON_LP>
</CONVERSION_FILTER>

Data Selection
This section describes the XML syntax for data selection and
gives examples.

A major benefit of the runubexml program is the ability to edit


data selection values. Data selection is how to control the data
that is used and processed by a report. This control is perhaps
the most commonly used of all the report options. For the
parallel batch strategy, which increases data throughput for
most batches, data selection is essential. When running the
same batch in parallel, data selection is used to create unique,

Page 12
non-overlapping data sets for each of the parallel reports,
which is run on a multi-CPU server.

The request XML document of runubexml makes direct


manipulation of data selection available for the first time. The
intention of runubexml program is to have another external
program to change data selection values (and other options).
It the past, changing and setting data selection values were
extremely difficult. Custom JDE development had to be done
for specific reports. The reason for custom reports was that is
almost impossible to change selection values from an external
program. The selection values are stored in a blob or in a
binary field in the Version Table, F983051. Internally, TAM,
Table Access Method, which is a JDE proprietary program, is
used to control and set the values in the Version Table.
Data selection features follow the same ones as an interactive
client. The XML syntax for the DATA_SELECTION section is
different. It needs to be learned to develop a program and
change the selection values and columns.
An example of R014021 for an interactive client data selection
is:

In the above interactive screen, the key elements are the


column headings: Operator, Left Operand, Comparison, and
Right Operand. Each of the elements has an equivalent XML
grammar and syntax.

Page 13
It is beyond the scope of the paper to present a full XML
grammar and syntax. However, a summary of the elements
are:
Interactive XML Word XML Values
Element
Operator CLAUSE TYPE Logical operators:
WHERE
AND
OR
Left Operand COLUMN NAME <Valid column in the
report’s business view>
Comparison OPERATOR TYPE Comparison operators:
EQ - equal
NE – not equal
LT – less than
GT – greater than
LE – less than or equal
GE – greater than or
equal
Comparison OPERATOR TYPE Special operators:
(special)
BW – range of values
IN – list of distinct
values
Right Operand <depends on Left Can be <valid business
Operand and view column>, value,
OPERATOR TYPE> range of values, list of
values, null, blank, zero

The operator type of WHERE, AND, and OR are straight


forward. The Left Operand will always be a column name.
There several kinds comparison operators. The simple ones of
equal, not equal, etc are found in standard computer
languages. In addition, there is a value range operator, BW,
and a list operator, IN, which has a list of specific, distinct
values.
The right operand is the most complicated for XML data
selection. It values for the right operand are based on the left
operand data type. Potentially, the values can be a business
view column, a value, and values of the list operator or of the
range operator. The values also could be NULL, blank or ZERO.
Below are series of XML excerpts from the request XML file that
show some of the possibilities for the operands and
comparisons. The examples are meant only to demonstrate
XML. It is not intended to produce report results. The bold,
italized text are my comments. The below data selection is the
same as the above interactive data selection example for
R014021:

Page 14
<DATA_SELECTION TYPE="VALUES">
The following lines represent the first line in the
interactive screen that starts with “WHERE”.
Symbolically, this means: Where Address Book is Greater
Than NULL.
- <CLAUSE TYPE="WHERE">
<COLUMN NAME="Address Number" ALIAS="AN8" TABLE="F0101"
INSTANCE="0" />
<OPERATOR TYPE="GT" />
- <OPERAND TYPE="VALUES">
<LITERAL VALUE="" />
</OPERAND>
</CLAUSE>

Below the lines represent: AND Address Book is Greater


Than 40.
- <CLAUSE TYPE="AND">
<COLUMN NAME="Address Number" ALIAS="AN8" TABLE="F0101"
INSTANCE="0" />
<OPERATOR TYPE="GT" />
- <OPERAND TYPE="VALUES">
<LITERAL VALUE="40" />
</OPERAND>
</CLAUSE>

Below the lines represent: AND Business Unit is in the


RANGE of 50 to 60.
- <CLAUSE TYPE="AND">
<COLUMN NAME="Business Unit" ALIAS="MCU" TABLE="F0101"
INSTANCE="0" />
<OPERATOR TYPE="BW" />
- <OPERAND TYPE="VALUES">
- <RANGE>
<LITERAL_FROM VALUE="50" />
<LITERAL_TO VALUE="60" />
</RANGE>
</OPERAND>
</CLAUSE>

Below the lines represent: OR Business Unit is in the


LIST of values 81, 82, 83, 84, 85.
- <CLAUSE TYPE="OR">
<COLUMN NAME="Business Unit" ALIAS="MCU" TABLE="F0101"
INSTANCE="0" />
<OPERATOR TYPE="IN" />

Page 15
- <OPERAND TYPE="VALUES">
- <LIST>
<LITERAL VALUE="81" />
<LITERAL VALUE="82" />
<LITERAL VALUE="83" />
<LITERAL VALUE="84" />
<LITERAL VALUE="85" />
</LIST>
</OPERAND>
</CLAUSE>
</DATA_SELECTION>

One strategy is to generate the XML grammar without knowing


its grammar is to run the report of interest on the server from
an interactive client. This has the effect of putting the report’s
specifications on the server. After the interactive step, Step 2
of the runubexml process, generate the request XML file is
done. The resulting request file will have the data selection
that was setup from the client workstation.
TIP & STRATEGY - One technique used to create the example
XML statements for the paper was to run a JDE report on the
server from a client workstation. This has the effect of putting
the report specification and the reporting options on the server.
The reporting options will be on the server, if the report is not
run again with different reporting options.
To get the XML statements for options like data selection, data
sequencing, the request XML file, Step 2, is regenerated after
the report was run from a client workstation. The XML is then
generated for the appropriate option. This technique is a quick
way to create the XML syntax. The request file section for data
selection or data sequencing can then be used as a template in
a program.
If only values are to be change in the production report, then
get the report correct interactive, and the XML Editor or string
substitution program will only have to change values. Adding
new columns, new comparisons and values will be more
complicated. However, the same approach can used to get the
correct XML syntax.
CAUTION - The XML files can be changed by an editor. For
testing purposes, manual changes are appropriate. However,
for a production system XML changes should be made by a
developed program or an XML editor. Manual changes should
be done carefully. The request XML file is not formatted for
easy changes. The lines are quite long, and by breaking a line
in the middle of word or in the wrong place, the XML file will not
work.

Page 16
Data Sequencing
Data sequencing controls how the resulting report data is
sorted and displayed in the report. The sort order is based on
the report’s business view columns. The columns can be sorted
ASCENDING or DESENDING. The order in which the business
view columns are specified controls which column is sort first,
second, third, etc.
TIP – If you don’t know the report’s business view columns,
then used the XML option, <BUSINESS_VIEW VALUE=”1”/>, in
the base XML file, Step 1. This will generate all of the business
view columns in the request XML file.

An example of R014021 report from an interactive data


sequencing screen from a client workstation is:

An example of the same data sequencing options in XML are


shown in the below example. This is an excerpt from a request
XML file:
- <DATA_SEQUENCING TYPE="VALUES">
- <!--
Please do not change the Level break value for Data Sequencing.
Page break value is valid only if level break is true. A Data
sequence line can be deleted if it does not have a level break
-->
- <DATA SORT="ASCENDING" PAGE_BRK="N" LEVEL_BRK="N">
<COLUMN NAME="Address Number" ALIAS="AN8"
TABLE="F0101" INSTANCE="0" />
</DATA>
- <DATA SORT="DESCENDING" PAGE_BRK="N" LEVEL_BRK="N">

Page 17
<COLUMN NAME="Business Unit" ALIAS="MCU" TABLE="F0101"
INSTANCE="0" />
</DATA>
- <DATA SORT="ASCENDING" PAGE_BRK="N" LEVEL_BRK="N">
<COLUMN NAME="Start Effective Date" ALIAS="EFTB"
TABLE="F0101" INSTANCE="0" />
</DATA>
- <DATA SORT="DESCENDING" PAGE_BRK="N" LEVEL_BRK="N">
<COLUMN NAME="Search Type" ALIAS="AT1" TABLE="F0101"
INSTANCE="0" />
</DATA>
</DATA_SEQUENCING>

In the above example, the column names are identical to the


column names displayed in the XML business view section, if
the business view option was chosen in the base XML file. The
data sort options can be seen for each column as ASCENDING
and DESCENDING. The page break and level break features
were not tried, but can be seen in the data sort line.

Page 18
Appendix – Base XML File
The base XML appendix gives an example of step 1 of the
runubexml process.
Below is an example of the starting file in the runubexml
submission process. At first, the file is not present on JDE ERP
systems. It has to be generated, and can be given any name
with a “.xml” file extension. The name “base.xml” is an
arbitrary name. The name was chosen because it reflects the
starting XML file.
Typically this XML file can be re-used over and over again for all
reports, or individual files can be generated. It is up to the
implementation style of the site.
The base file is created by the following command:
runubexml G CREATE_XML base.xml

Raw Base XML File


<?xml version="1.0" encoding="utf-8" ?>
- <jdeRequest type="ube" user="MYUSERID"
pwd="MYPASSWD" environment="MYENV" session="">
- <!--
This document is automatically generated by the
J.D.Edwards APIs
-->
- <ACTION TYPE="CREATE_XML"
TEMPLATE_TYPE="LAUNCH_JOB">
<REPORT_NAME VALUE="MYREPORT" />
<REPORT_VERSION VALUE="MYVERSION" />
<JARGON_SYSTEM_CODE VALUE="1" />
<COMMENTS VALUE="1" />
<DATA_TYPING VALUE="1" />
<BUSINESS_VIEW VALUE="0" />
<PRINTER_INFORMATION VALUE="0" />
<POPULATED VALUE="1" />
</ACTION>
</jdeRequest>

Edited Base XML File

Below is an example of an edited base XML file. The changed


values have been emphasized by large case, bold letters.
These values are the necessary, minimum changes.

Page 19
<?xml version="1.0" encoding="utf-8" ?>

- <jdeRequest type="ube" user="JDE" pwd="JDE"


environment="PY7333" session="">
- <!--
This document is automatically generated by the
J.D.Edwards APIs
-->
- <ACTION TYPE="CREATE_XML"
TEMPLATE_TYPE="LAUNCH_JOB">

<REPORT_NAME VALUE="R014021" />

<REPORT_VERSION VALUE="XJDE0001" />


<JARGON_SYSTEM_CODE VALUE="1" />
<COMMENTS VALUE="1" />
<DATA_TYPING VALUE="1" />
<BUSINESS_VIEW VALUE="0" />
<PRINTER_INFORMATION VALUE="0" />
<POPULATED VALUE="1" />
</ACTION>
</jdeRequest>

Page 20
Appendix – Request XML File
The Request XML appendix gives an example of step 2 of the
runubexml process.
Once the base XML file is generated and edited, the base XML
file is submitted with runubexml command. The resulting XML
file is a specific report request. In the document the file has
been called the “request XML file”. This is an arbitrary name.
The file can be called anything. For example, the below file
might be better if it is called, “abook.xml”, which is short for
address book.
The request XML file is also the file that might be dynamically
changed by program or scheduler software. Likely the most
common change will in the Data Selection section. An example
of an address book, request XML file is:
<?xml version="1.0" encoding="utf-8" ?>
- <jdeRequest pwd="JDE" type="ube" user="JDE"
environment="PD7334">
- <!--
This Template is automatically generated by JDEdwards APIs
-->
- <ACTION TYPE="LAUNCH_JOB">
<JOBQUEUE VALUE="QB7334" />
<REPORT_NAME VALUE="R014021" />
<REPORT_VERSION VALUE="XJDE0001" />
<JARGON_SYSTEM_CODE VALUE="" />
- <RUNTIME_OPTIONS VIEW="V0101H" VALUE="VALUES"
SECTION_ID="2">
<DATA_SELECTION TYPE="VALUES" />
- <DATA_SEQUENCING TYPE="VALUES">
- <!--
Please do not change the Level break value for Data Sequencing. Page
break value is valid only if level break is true. A Data sequence line can
be deleted if it does not have a level break
-->
- <DATA SORT="ASCENDING" PAGE_BRK="N" LEVEL_BRK="N">
<COLUMN NAME="Description - Compressed" ALIAS="DC"
TABLE="F0101" INSTANCE="0" />
</DATA>
</DATA_SEQUENCING>
<PROCESSING_OPTIONS TYPE="VALUES" />
<REPORT_INTERCONNECT TYPE="VALUES" />
- <PRINTER_INFORMATION TYPE="VALUES">
<PRINTER_NAME VALUE="JDELaser Postscript NT" />
<NUMBER_OF_COPIES VALUE="1" />

Page 21
<PAPER_SOURCE VALUE="1" />
- <CONVERSION_FILTER TYPE="PS">
- <NON_LP>
<PAPERTYPE VALUE="LETTER" />
<PAGEWIDTH VALUE="0" />
<PAGEHEIGHT VALUE="0" />
<ORIENTATION VALUE="0" />
</NON_LP>
</CONVERSION_FILTER>
</PRINTER_INFORMATION>
- <ADVANCED_OPTIONS TYPE="VALUES">
<JDELOG VALUE="0" />
<JDEDEBUGLOG VALUE="0" />
<SHOW_PDF_LINK VALUE="0" />
<PRINT_IMMEDIATE VALUE="0" />
<SAVE_PDL VALUE="0" />
<CREATE_CSV VALUE="0" />
<OSA_CLASS VALUE="" />
</ADVANCED_OPTIONS>
</RUNTIME_OPTIONS>
- <BUSINESS_VIEW>
- <AVAILABLE_COLUMNS>
<COLUMN NAME="Address Number" ALIAS="AN8" TABLE="F0101"
INSTANCE="0" />
<COLUMN NAME="Alpha Name" ALIAS="ALPH" TABLE="F0101"
INSTANCE="0" />
<COLUMN NAME="Business Unit" ALIAS="MCU" TABLE="F0101"
INSTANCE="0" />
<COLUMN NAME="Search Type" ALIAS="AT1" TABLE="F0101"
INSTANCE="0" />
<COLUMN NAME="Start Effective Date" ALIAS="EFTB"
TABLE="F0101" INSTANCE="0" />
<COLUMN NAME="Description - Compressed" ALIAS="DC"
TABLE="F0101" INSTANCE="0" />
</AVAILABLE_COLUMNS>
</BUSINESS_VIEW>
</ACTION>
</jdeRequest>

Page 22
Appendix – Output XML File
The output XML appendix give an example of the last step, step
3, of the runubexml process.
The output file is the last XML file in the runubexml steps. It is
a result of submitting the request XML file.
In the output XML file, the most significant thing is the JDE Job
ID. The ID is the report ID that can be found on the Submitted
Batch screen. The Job ID can also be used to lookup the
operating system process ID of the runbatch program. A query
to the server’s F986110 table using the Job ID will give the
process ID. The F986110 could also be periodically queried to
determine the reports completion status.

NOTE: Excessive polling of the F986110 table


can affect overall batch performance and can
cause a high number of database table locks.

Once the output XML file has been created, it is an indication


that a record has been created in the Job Master table. It is
also an indication that the report may have completed, “Done”,
if it is a small job or it may indicate that the job has the status
of “In Queue”, “Waiting” or “Processing”.
An example of the output XML file for an address book report
is:
<?xml version="1.0" encoding="utf-8" ?>
- <jdeRequest pwd="JDE" type="ube" user="JDE"
environment="PY7333">
- <!--
ACTION can have a type of CHK_STATUS,
RETRIEVE_OUTPUT, CANCEL_JOB, PRINT_JOB that can be
performed after launching a report. The default type is
CHK_STATUS
-->
- <!--
This Template is automatically generated by JDEdwards
APIs
-->
- <ACTION TYPE="CHK_STATUS">
<REPORT_NAME VALUE="R014021" />
<REPORT_VERSION VALUE="XJDE0001" />
<JOBID VALUE="3" />
- <!--
CANCEL_JOB can have a type of DELETE_JOB or
TERMINATE_JOB or STOP_SUBSYSTEM_JOB or
END_SUBSYSTEM_JOB. The default type is
DELETE_JOB.
-->

Page 23
<CANCEL_JOB TYPE="DELETE_JOB" />
- <!--
This runtime option PRINTER_INFORMATION cannot be
changed. This can take values of DEFAULT or
VALUES. The default is DEFAULT.
-->
- <PRINT_JOB>
- <PRINTER_INFORMATION TYPE="DEFAULT">
<PRINTER_NAME VALUE="" />
<NUMBER_OF_COPIES VALUE="0" />
<PAPER_SOURCE VALUE="0" />
- <!--
CONVERSION_FILTER can take values of PS
or LP or PCL or CUSTOM. The default is
PS.
-->
- <CONVERSION_FILTER TYPE="PS">
- <NON_LP>
<PAPERTYPE VALUE="" />
<PAGEWIDTH VALUE="0" />
<PAGEHEIGHT VALUE="0" />
<ORIENTATION VALUE="0" />
</NON_LP>
</CONVERSION_FILTER>
</PRINTER_INFORMATION>
</PRINT_JOB>
- <RETRIEVE_OUTPUT>
- <!--
OUTPUT states the requested output
document.It can have a type of JDELOG or
JDEDEBUGLOG or PDF or CSV or XML. The
outputs can be turned ON or OFF by making
their values '0' or '1'. Their default values are
'0'.
-->
- <OUTPUT>
<JDELOG VALUE="0" />
<JDEDEBUGLOG VALUE="0" />
<PDF VALUE="0" />
<CSV VALUE="0" />
<OSA VALUE="" />
</OUTPUT>
</RETRIEVE_OUTPUT>
</ACTION>

Page 24
</jdeRequest>

Page 25
Appendix - Windows2000 Path
The following information is specific to Windows2000. The
same information applies to NT, but the steps for setting the
Environment Paths may be different.

Windows2000 Environment Paths


For the JDE computer ID, the OneWorld system, bin32 directory
and the JDE library directory paths must be set in the Windows
Environment Path. The runubexml command will not work
unless these directory paths are set.

Checking Windows2000 Environment Paths


The runubexml program will not work at the system command
level unless the OneWorld directory paths are setup. You can
check the Path settings in a command (cmd) window by typing
“PATH” and then press return. In the results look for the
following:
E:\JDEdwardsOneWorld\ddp\B7333\system\bin32;
E:\ JDEdwardsOneWorld\ddp \B7333\lib32;
E:\ JDEdwardsOneWorld\ddp \B7333\libv32;
The E: drive may be different for your installation. If the three
directory paths are not in the results, the missing ones need to
be added.

Setting directory paths


If the environment paths are not present, they can be easily
added. Once the paths have been added paths, they can be
rechecked in a command window, but it must be a new
command window, and not the original one. To add the
environment paths, do the following steps:
1. Right click on the MyComputer icon, and go to
properties.
2. On the System Properties screen, click on the Advanced
tab.
3. Select the Environment Variables button. The following
Environment Variable Screen will appear:

Page 26
Environment Variable Screen

4 In the lower System variables panel, scroll down to


“Path”, highlight “Path” and then press the “Edit...”
button.
The Edit System Variable dialog box will appear, as shown
below. On the second text box, you will enter the
OneWorld executable and library paths at the end of the
Variable Value line. Each entry is separated by a semicolon
in the Variable Value line.

Edit System Variable Dialog Box

Page 27
The paths that need to be there are:

OneWorld Paths
E:\JDEdwardsOneWorld\ddp\B7333\system\bin32;
E:\JDEdwardsOneWorld\ddp\B7333\lib32;
E:\JDEdwardsOneWorld\ddp\B7333\libv32;

(The separator betweens the paths is semicolon “;” with no


spaces.)
5 After adding the path information, you will have to log off and
back on the server for the changes to take effect for the JDE
computer ID, or start a new command window.

Page 28
Appendix - Common Errors
The following sections give the results of some common errors
or mistakes that could occur when using the runubexml
command. The intent of the sections is to help in diagnosing
simple errors.
The topics which are discussed are:
 Incorrect Report ID
 Incorrect Password
 Bad XML file
 Invalid report name
 Invalid report version
 CREATE_XML Argument must be in CAPTIALS
 Windows2000 Environment Path Not Set
 First Argument Not “G” or “S”
 No Arguments
 Bad CREATE_XML Argument
 Bad File Extensions
 First XML File Doesn’t Exist

Incorrect Report ID & Incorrect Password


When an incorrect JDE ERP user ID or an incorrect password is
in the edited base XML file, error messages are generated in
the command window. The following messages occur:
Could not initialize an ENV handle for User in Environment
Empty request file generated.

Bad XML file


When the XML syntax is incorrect a message will appear in the
XML file. The XML file is parsed and an error is generated when
found. An example of bad syntax in a request XML file is:
<returnCode code=”4”>Fatal XML Parse error at line nn char
nn:” </returnCode>

Invalid report name


When a bad report name is given in the edited base XML file,
the following messages is created in the resulting request XML
document:
ACTION_TYPE=”ERROR MESSAGE”
No driver section found for report

Invalid report version


Similar to the invalid report name, a bad version in the base
XML file will create the following message in the request XML
file:
Version not available
ACTION_TYPE=”ERROR MESSAGE”

Page 29
CREATE_XML Argument must be in CAPTIALS
The CREATE_XML argument that goes with G must be
capitalized. When this is in lower case letters, an execution
error occurs. The below example shows the results of testing
G/g and CREATE_XML arguments.
Testing the G & CREATE_XML Arguments
CORRECT COMMAND:
E:\JDEdwardsOneWorld\ddp\B7333\system\bin32>runubexml G
CREATE_XML base.xml

ERROR:
E:\JDEdwardsOneWorld\ddp\B7333\system\bin32>runubexml g
CREATE_XML xt.xml

ERROR:
E:\JDEdwardsOneWorld\ddp\B7333\system\bin32>runubexml g
create_xml base.xml

Error Message:
runubexml: Z:\builds\system\serverexe\runubexml.C : Unknown
XML template type 'create_xml' specified for generation.

Windows2000 Environment Path Not Set


It is common that the Windows2000 Environment Paths are not
set in a new OneWorld installation.. If the runubexml
command is executed under this condition, an Application Error
dialog will appear. When this occurs, close the dialog box by
pressing the OK button, and then check the paths.

Application Error Dialog

First Argument Not “G” or “S”


An Application Error Dialog will also occur, if the first argument
of runubexml is not either “G” or “S”.

Page 30
No Arguments
Running runubexml without arguments will give you a
message, “Incorrect number of command line parameters”.

E:\JDEdwardsOneWorld\ddp\B7333\system\bin32>runubexml
runubexml: Z:\builds\system\serverexe\runubexml.C :
Incorrect number of command line parameters

Bad CREATE_XML Argument


The below example shows what occurs when a bad argument
for CREATE_XML in the generation step, G. (REATE_XML was
entered instead of CREATE_XML).
E:\JDEdwardsOneWorld\ddp\B7333\system\bin32>runubexml
g REATE_XML base.xml
runubexml: Z:\builds\system\serverexe\runubexml.C :
Unknown XML template type 'REATE_XML' specified for
generation.

Bad File Extensions


The files MUST have an xml extension in the runubexml
command! In the example the first file was purposefully given
as “base.txt”. The correct file name should have been
“base.xml”.
E:\JDEdwardsOneWorld\ddp\B7333\system\bin32>runubexml
S base.txt sub.xml
runubexml: Z:\builds\system\serverexe\runubexml.C :
Couldn't open file 'sub.xml' for Batch XML request
input.

The same rule applies for the second file name. It must have a
file extension of “.xml”. In the example the second file was
purposefully given as “sub.txt”. The correct file name should
have been “sub.xml”.
E:\JDEdwardsOneWorld\ddp\B7333\system\bin32>runubexml
S base.xml sub.txt

runubexml: Z:\builds\system\serverexe\runubexml.C :
Couldn't open file 'sub.txt' for Batch XML request input.

First XML File Doesn’t Exist


When the first XML file doesn’t exist or a wrong name is given,
an error occurs. In the example below, the file, base.xml, was
deleted and the runubexml command was executed.
E:\JDEdwardsOneWorld\ddp\B7333\system\bin32>runubexml
S base.xml xx.xml

Page 31
runubexml: Z:\builds\system\serverexe\runubexml.C :
Couldn't open file 'xx.xml'for Batch XML request
input.

Process <runubexml> could not be registered


In Windows, sometimes a command window error occurs when
the runubexml command is tried for the first time. The “could
not register message” usually means that JDE ERP services
have been started with a different computer ID than the JDE
computer ID. This can be verified by checking in the Services
window. If the ID is not the same change the ID to JDE. The
JDE ERP system will have to be stopped and restarted for the
change to take effect.

Page 32
 J.D. Edwards World Solutions Company. All Rights Reserved
The materials contained herein are summary in nature, subject to change, and intended for general information only.

J.D. Edwards is a registered trademark of J.D. Edwards & Company.

The names of all other products and services of J.D. Edwards used herein are trademarks or registered trademarks of
J.D. Edwards World Source Company.

All other product names used are trademarks or registered trademarks of their respective owners.

 J.D. Edwards World Source Company 2001

Page 33

S-ar putea să vă placă și