The user interface on an AS/400 system is completely menu-driven; there is no shell. The interface makes extensive use of function keys F1-F24.
Note:
Although some screens in this chapter contain references to Release 6.3, all other information is them is accurate for Release 6.5.
Virtually every action performed via the menu has a command-line equivalent. Application executables, such as BEA TUXEDO utilities, can be invoked from the command line using the The notion of the is a request to search in the library list for the During this activation, if a service program (the AS/400 equivalent of a DLL or shared object) is needed, then the library list is searched again. The library list can be displayed with the Jobs define execution context (roughly equivalent to a process). There are two kinds of jobs: interactive and batch. When a user signs on to a system, an interactive job is assigned to the new session. All This section describes the two file systems that are important on an AS/400 platform: HFS and IFS.
HFS is the traditional flat file system. At the highest level it contains libraries. Each library may contain files, e.g., module files, program files, and physical files. A physical file, in turn, may contain members. All text files (including C program source code files) are stored as members of a physical file.
Executables may reside only in HFS, but symbolic links can be created from IFS to HFS via the HFS filenames are limited to ten characters and are not case-sensitive.
IFS is a directory-oriented file system designed to support PC file-serving. IFS (especially Executables may reside only in HFS, but symbolic links can be created from IFS to HFS via the With one exception ( Because there are no native editors for IFS files, we recommend using Client Access to view and edit these files on a PC. In addition to providing a 5250 emulator, Client Access allows IFS files to be mapped as network drives on the PC. All PC Client Access users must be enrolled on the AS/400 first.
Separate commands must be used for HFS and IFS files:
User Interface and AS/400 Concepts
Figure 2-1 Main Menu of Tasks for an AS/400 Platform
Invoking Programs from the Command Line
call
command. The call
command has the following syntax:
call
pgm
parm(arg1
arg2
. . . )PATH
and LD_LIBRARY_PATH
environment variables in the UNIX shell is replaced by the library list
. For example, the following command:
call hello parm('world')
hello
program. The first library in the library list that contains this program becomes the current library and the hello
program is activated.
dsplible
command, and manipulated with the addlible
and rmvlible
commands.
Interactive and Batch Jobs
call
commands are executed inside this job. The wrkactjob
command lists all active jobs on the system. (It is equivalent to the ps
command on a UNIX system.) A batch job can be submitted via the sbmjob
command. The wrksbmjob
command lists all submitted batch jobs.
HFS and IFS File Systems
HFS
addlnk
command.
Filenames
IFS
/QOpenSys
) closely resembles a UNIX file system.
addlnk
command.
Filenames
/QOpenSys
) filenames in IFS are case sensitive.
Editors
Commands for HFS and IFS Files
wrklib
, wrkf
, and wrkmbrpdm
commands work only with HFS objects.
Because the character sets on the AS/400 and the PC do not match, we also recommend turning on automatic EBCDIC/ASCII conversion for all files. To do so on a platform such as WIN95 or NT, complete the following procedure.
Character Set Conversion
When you are working with ILE/C programs in an HFS file system, you may redirect standard input, standard output, and standard error (the stdin
, stdout
, and stderr
files, respectively) by using the ovrdbf
command. See the CL Reference Manual for details.
There is no simple way to redirect standard IO and standard error messages to and from IFS files.
stdout
of an ILE/C program called prog
to an IFS file called /home/dougd/out
, enter the following.
The Two BEA TUXEDO commands, The The following example command lines show how to compile a C source file in member Note that the special system interface option Note also that debugging has been turned on by Currently you cannot specify a C source file on the The On a UNIX platform, the The On an AS/400 platform the Consider the following example command line.
This command accomplishes two tasks:
Development Environment
make
, lex
, and yacc
utilities are not available on the AS/400. The native character set is EBCDIC, not ASCII.
buildclient
and buildserver
, have been renamed buildclt
and buildsrvr
, respectively, in order to conform to the 10-character maximum.
buildclt
and buildsrvr
commands accept input only for module files (*MODULE
) and service program files (*SRVPGM
), and produce output program files (*PGM
). The ILE/C
modules must be produced by crtcmod
. Likewise, ILE/COBOL
modules must be produced by crtcblmod
.
cx
of a file called tuxsrc
in a library called apps
. The object module is created in a file called cx
in a library called apps
.
crtcmod module(apps/cx) srcfile(apps/tuxsrc) srcmbr(cx) +
sysifcopt(*ifsio) dbgview(*all) define('DEF=1')sysifcopt
(*ifsio
) is specified here. This option allows the C runtime library to access IFS files. Because the BEA TUXEDO system is compiled with this option, we strongly recommend using it for compatibility.
dbgview
(*all
) and the preprocessor defined for DEF
has been set to 1
. This is equivalent to specifying -DDEF=1 -g
on a cc
command line (on a UNIX platform).
buildclt
or buildsrvr
command line.
-f
and -l
options to the buildclt
and buildsrvr
commands also mean something slightly different from the same options to the equivalent commands (buildclient
and buildserver
) on a UNIX system.
-f
(first) option allows you to specify a list of items to be passed to the cc
command such that the objects produced by running cc
on these items are linked before the BEA TUXEDO libraries are linked.
-l
(last) option allows you to specify a list of items to be passed to the cc
command such that the objects produced by running cc
on these items are linked after the BEA TUXEDO libraries are linked.
-f
option accepts object modules (that is, files of type *MODULE
) only, and the -l
option accepts service programs (that is, files of type *SVRPGM
) only.
buildclt Example
buildclt ('-fapps/cx' '-fapps/cy' '-oapps/client')
cx
and cy
) in an HFS library called apps
.
client
in the apps
library.
Consider the following example command line:
This command accomplishes two tasks:
buildsrvr Example
buildsrvr
('-fapps/sx' '-fapps/sy' '-oapps/server' '-sSVC'
)
sx
and sy
in an HFS library (apps
).
server
) in a library (apps
) which offers a service (SVC
).
If the Both The BEA TUXEDO system is distributed with a set of tools for manipulating the environment: -k
option of buildsrvr
is used, then the server main
code is generated in member BS
pid
of the tuxsrc
file in the qtemp
library, where the value of pid
is the process ID of the buildsrvr
process. Because the qtemp
library is removed at the end of each job, you must make a copy of it in a permanent directory before signing off, if you want to keep it.
mkfldhdr
and viewc
generate header files in IFS, usually in the current directory. You must copy these .h
files into an HFS h
file so the C compiler will be able to find them.
viewc
also generates the binary output file with a .VV
(instead of a .V
) suffix.
Runtime Environment
getenv
, putenv
, setenv
, and env
.
V4R1 provides a single command, In addition, the wrkenvvar
, that offers functionality similar to that available through getenv
, putenv
, setenv
, and env
. The wrkenvvar
command differs from the BEA TUXEDO commands, however, in several aspects. First, unlike the distributed tools delivered with the BEA TUXEDO system, wrkenvvar
cannot handle the expansion of variable names marked with a $
prefix (similar to shell variable expansion).
hostname
and id
utilities are distributed only with the BEA TUXEDO system:
hostname
command prints the name of the network node for the AS/400. The machine name used in the UBBCONFIG
configuration file must match the name returned by hostname
.
id
command prints the UID
and GID
of the current user profile. The UID
and GID
values specified in the UBBCONFIG
configuration file must match the values returned by the id
command. (See Chapter 3, "Configuration for BEA TUXEDO System Administration.")
All BEA TUXEDO executables and header files are packaged in an HFS library (see Let's use Begin by building the tuxlib
during installation). Other data files (such as udataobj/* and locale/C/*)
are placed in $TUXDIR
in IFS. $TUXDIR/bin
has symbolic links to HFS executables. $APPDIR
should also reside in IFS. You must add the HFS library to the library list before invoking any BEA TUXEDO commands.
Sample Application
simpapp
as an example. Assume tuxdir
is installed in /QOpenSys/tuxedo
, tuxlib
is installed as tuxedo
, and APPDIR
is set to /home/apps/simpapp
.
simpcl
and simpserv
programs (in Steps 1-9).
apps
.
c
rtlib
appstuxsrc
.
crtsrcpf apps/tuxsrc rcdlen (120)
simpcl.c
from /qopensys/tuxedo/apps/simpapp
to member simpcl
or tuxsrc
.
cpyfrmstmf fromstmf('/qopensys/tuxedo/apps/simpapp/simpcl.mbr') +
tombr('/qsys.lib/apps.lib/tuxsrc.file/simpcl.mbr') +
mbropt(*replace)
crtcmod module(apps/simpcl) srcfile(apps/tuxsrc) +
srcmbr(simpcl) sysifcopt(*ifsio)buildclt
.
call buildclt ('-fapps/simpcl' '-oapps/simpcl')
simpserv.c
from /qopensys/tuxedo/apps/simpapp
to member
simpserv
of tuxsrc
.
cpyfrmstmf fromstmf('/qopensys/tuxedo/apps/simpapp/simpserv.c') +
tombr('/qsys.lib/apps.lib/tuxsrc.file/simpserv.mbr') +
mbropt(*replace)
crtcmod module(apps/simpserv) srcfile(apps/tuxsrc) +
srcmbr(simpserv) sysifcopt(*ifsio)buildsrvr
command.
call
buildsrvr
('-sTOUPPER' '-fapps/simpserv' '-oapps/simpserv'
) /home/apps/simpapp/simpserv to
apps/simpserv
.
addlnk obj('/qsys.lib/apps.lib/simpserv.pgm') +
newlink('/home/apps/simpapp/simpserv')tuxlib
to the library list.
addlible tuxedo
call putenv 'TUXDIR=/QOpenSys/tuxedo'
call putenv 'APPDIR=/home/apps/simpapp'TUXCONFIG
file from the UBBCONFIG
configuration file UBBCONFIG
.
call putenv 'TUXCONFIG=$APPDIR/tuxconfig'
call tmloadcf ('-y' 'UBB')wrklnk
to verify that the file tuxconfig
has been created in
/home/apps/simpapp
.
call tmboot '-y'
Messages similar to those shown in Figure 2-2 are displayed.
Figure 2-2 Messages Displayed at Boot Time
Figure 2-3 shows the messages that are displayed.
call apps/simpcl 'abc'
Figure 2-3 Messages Displayed after the Client Is Called
$APPDIR
in IFS) on a Win95 PC,
use the Windows Explorer utility to map the AS/400/home/apps
IFS directory
to a network drive (such as F). Then use WordPad to open the userlog file in that
drive, as shown in Figure 2-4.
To shut down an application, enter the following command.
call tmshutdown '-y'
Figure 2-5 shows the messages displayed during the shutdown process.
Figure 2-5 Messages Displayed during Shutdown
IBM ships a set of IPC tools as a PTF. These tools provide the functionality available on a UNIX system through the ipcs
and ipcrm
commands. There are some differences, however, the IBM tools have different names and produce output in a different manner.
To view the IPC resources consumed by all your applications, enter the following command.
call qp0zipcs
The output of qp0zipcs
is generated in *QPRINT
which means that it can be viewed as a spool file with the wrksplf
command.
To remove a particular IPC resource, such as a message queue ID (qid
), enter the following command.
call qp0zipcr ('-qqid')
When an error occurs while you are running qp0zipcr
, a message is generated in the joblog
. Use the dspjoblog
command to view it.
$APPDIR
is in /QOpenSys
.
hostname
command.
BRIDGE
device needs to be specified.
The UNIX shell scripts will not work here.
By default, the By default, the In this case, the stub files will be generated in the physical file then /Q
threshold
command parameter specified on the qmadmin qcreate
command line (such as the server RCMD
), must refer to a symbolic link to an executable program in HFS. The link must be included in $PATH
; typically it is found in $APPDIR
.
TxRPC
tidl
compiler does not run the C preprocessor. This means that if you have #define
statements or any other pre-processor constructs in the input file, then you will need to specify the -cpp_cmd
option:
call tidl ('-cpp_cmd' 'crtcmod' . . . )
tidl
command also produces server and client stub files in the current IFS directory. The stub files are named x_cstub.c
and x_sstub.c
. It is also possible to generate stub files in HFS by using the -out
option to specify a library in the directory /qsys.lib
, as in the following example:
call tidl ('-out' '/qsys.lib/tuxedo.lib' . . . )
idl
with members named x_cs
and x_ss
for client and server stubs, respectively. The tidl
command also generates a header file in the current working directory of IFS. For example, if the idl
compiler is run on input file x.idl
as follows:
call tidl ('-cpp_cmd' 'crtcmod' '-keep' 'c_source' x.idl)
tidl
will generate the following three files in the current working directory of IFS:
In addition, the If the The BEA TUXEDO system supports clients and servers written in the ILE/COBOL language. The major differences between MicroFocus COBOL and ILE/COBOL are listed below.
tidl
compiler will copy the header file to member x
belonging to file h
in the qtemp
library.
-keep
option is not specified, then the C compiler will be invoked on the stub files to produce object modules x_cs
and x_ss
in library qtemp
. (qtemp
is the default output library which can be overridden by the -out
option, as described earlier.)
/COBOL
With Release 6.5, you can administer a BEA TUXEDO application through any Web browser (such as Netscape or Internet Explorer) by using the Web-based GUI for administration. This section provides some tips for running the Web GUI on an AS/400 platform.
Two programs, The first line should begin with // Several environment variables, such as One additional input file that For example, suppose the BEA TUXEDO system has been installed in For more detailed information on creating an Current implementation also requires that for all user CGI programs, the HFS library in which they reside be added to the library list.
The procedure for setting up a batch job with All To start the Web GUI for BEA TUXEDO administration on the AS/400, enter the following URL.
where:
Web GUI
tuxwsvr
and wlisten
, need to be run in the background. This can be accomplished by running a CL script using sbmdbjob
. For example, the following CL script could be used to start tuxwsvr
.
//BCHJOB JOB(WEBSERVER) JOBD(TUXADM/JOBD)
addlible tuxlib
cd '/home/tuxadm/web'
call setenv env
call tuxwsvr ('-l//lc400b.beasys.com:3184' '-iwinput.ini')BCHJOB
which allows a number of parameters to be set. (See the CL Programming Manual.) The JOB
parameter, for example, sets the name of the job such that it appears on a WRKACTJOB
screen. A customized Job Description is needed here also so that the job can be run in batch. The default Job Description for interactive sessions (QDFTJOBD
) cannot be used here. To create a new one, use WRKJOBD
to copy QDFTJOBD
to TUXADM/JOBD
, and then add a USER
name to TUXADM/JOB
.
TUXDIR
, also need to be set. To set an environment variable, list all necessary environment settings in an env
file and then run the setenv
command, specifying the env
file on the command line. Set any other application-specific variables (such as APPDIR
) as well.
tuxwsvr
expects is an initialization or ini
file. The ini
file tells the server where to find HTML pages and Java images. For example:
CGI /cgi-bin tuxdir/bin
HTML /java/images tuxdir/web/gui/java/bea/tuxadm/images
JAVA /java tuxdir/web/gui/java
HTML /docs tuxdir/docs
HTML / tuxdir/udataobj/webgui /qopensys/tuxr65
and you are now creating an ini file called winput.ini
. If you substitute the root directory of the BEA TUXEDO system for the word tuxdir
in the lines shown above, your ini
file will look like the following.
CGI /cgi-bin /qopensys/tuxr65/bin
HTML /java/images /qopensys/tuxr65/web/gui/java/bea/tuxadm/images
JAVA /java /qopensys/tuxr65/web/gui/java
HTML /docs /qopensys/tuxr65/docs
HTML / /qopensys/tuxr65/udataobj/webguiini
file for tuxwsvr
, see tuxwsvr
(1) in the BEA TUXEDO Reference Manual.
wlisten
is similar to the one you follow to set up a batch job for tuxwsvr
.
wlisten
options are taken from an ini file that is specified with the -i
option. This ini file must be created; IT IS NOT GENERATED WHEN YOU INSTALL BEA TUXEDO ON THE AS/400. For detailed information on creating an ini
file for wlisten
, see the wlisten
(1) in the BEA TUXEDO Reference Manual. The following is an example.
TUXDIR=/qopensys/tuxr65
NADDR=0x00020c71c604a68d
CODEBASE=/jav
DOCBASE=http://lc400b:3184/docshttp://machine_name:port/cgi-bin/tuxadm?TUXDIR=tuxdir&INIFILE=ini_file
machine_name:port
is the AS/400 machine/port combination on which tuxwsvr
is running.
For additional information on preparing to use the Web GUI, refer to the BEA w Installation Guide.