|
xbms2mod is the BMS Macro Compiler from XFRAME. It allows to import BMS source originally written on and for mainframe. xbms2mod converts BMS code into a module file, to be used by XCICS/TS.
The name of the map set and maps to import is obtained from the declarations made in the source file. The new generated module file is named according to the XSDF convention.
Configuration
In order to configure xbms2mod, following environments must be set:
XSDF_MODULES_PATH
|
location of XCICS map modules: it indicates the directory containing the module files. A module file is the file resulting from the import and compilation of the original BMS code. This path is very important and should be set in accordance with the used directory s’ structure.
|
XSDF_INCLUDES_PATH
|
location of BMS generated “C” and "PLI" includes: it indicates the directory which contains the include files used as header files by programs written in C or PL/I language.
|
XSDF_COPIES_PATH
|
location of BMS generated COBOL copies: it indicates the directory containing the copybooks used by the COBOL programs.
|
XSDF_DUMMYSECT_PATH
|
location of XSDF generated ASM dummies: it indicates the directory containing the structures (DSECTs) for Assembler programs.
|
XSDF_BMSSRC_PATH
|
location of the BMS sources generated by XSDF
|
XMAPDEFLANG
|
(L|A|C) ”C” language, Assembler, Cobol : defines the default map language when not specified in the XSDF module
|
The values passed to these environment variables should be customized to adapt it to the specific user’s environment.
If xbms2mod cannot locate the configuration environments, or some environment variables are not set, it will assume the following default values:
modules path = $HOME/sdf
includes path = $HOME/include
copies path = $HOME/cobcpy
dummysect path = $HOME/asm
BMS sources path = $HOME/bms
Syntax
The syntax of xbms2mod is :
xbms2mod [options] file
Options
When no argument is specified, XBMS2MOD displays its syntax and also its options. This possibility to call XBMS2MOD without options can be used as a help display. xbms2mod offers the following options :
-b <path>
|
adds path to the BMS copy search path (default is current directory)
|
-v
|
turns verbose mode on. With verbose mode on, XBMS2MOD prints out its settings.
|
-d
|
do nothing (for compatibility with older version)
|
-s
|
shifts map one byte right (default behavior)
|
-l
|
shifts map one byte left
|
-r
|
shifts map one byte right
|
-c
|
enables copybook generation. By default no copybook is generated. The specification of the -c option produces the creation of copybooks. The programming language in which the copybook is generated depends on the LANG statement coded in the definition of the map using BMS macros. If the LANG statement is omitted, it will be assumed that an Assembler copy must be generated.
|
-j
|
enables XJWEB customizable JSPs generation
|
-M <path>
|
specifies an alternate path for modules
|
-I <path>
|
specifies an alternate path for C and PL/I includes
|
-C <path>
|
specifies an alternate path for copybooks
|
-A <path>
|
specifies an alternate path for Assembler DSECT
|
-J <path>
|
specifies a path for JSPs
|
-e
|
assumes ASSEMBLER as default language (default is COBOL)
|
-a
|
forces STORAGE=AUTO mode
|
-k
|
keeps slack field (LENGTH=0) in module
|
-K
|
sets default attribute to ASKIP (PROT is the default)
|
-P
|
forces ASKIP on PROT constant field
|
-i
|
ignores syntax errors
|
-g
|
generates alternate copybook structure
|
-s
|
sets the MAPSET name to the name of the source (without extension)
|
-L <lang>
|
overrides language specification for user structuresgeneration.
<lang> can assume the following values:
cobol generates COBOL copybook
pli generates PL/1 include file
clang generates C include file
asm generates 370 assembler DSECT
|
-t <type>
|
overrides system specific settings for COBOL copybooks generation.
<type> can assume the following values:
legacy generates COMP length fields
native generates COMP-5 length fields (default)
|
-p <mode>
|
overrides settings for structure packing in C includes generation.
<mode> can assume the following values:
default generates OS specific code
gcc generates with GCC compliant code
attribute generates with __attribute__((__packed__))
pragma generates with #pragma pack
hppragma generates with old HP-UX 11.11 style pragmas
none generates with no pragma/attribute
|
BMS copybook files
BMS copybook files (those included in the BMS source by the COPY statement), must be located in the BMS COPY search path. By default the xbms2mod looks for copybooks in the current directory. The search path may be extended using the -b option. I.e.
# xbms2mod -b $HOME/bmscpy -b $HOME/othermaps MYMAP.bms
C:\> xbms2mod -b D:\app\bmscpy MYMAP.bms
Copybook files must have no suffix or .bms or .BMS suffix. (i.e. CPY001, CPY002.bms, CPY003.BMS).
Example
# xbms2mod -vc -I/home/cfiles/include mapsetA.bms
The instruction above will compile mapsetA with turning verbose mode on, generating Copybooks in the following directory : /home/cfiles/include.
Once xbms2mod has finished compiling a map set, it displays the following messages :
xbms2mod - BMS compiler version 2.0
Current configuration:
Copybook generation : enabled
First char cutting : disabled
C language header files path : /home/cfiles/include
COBOL copy files path : /users/xsdf/v2/copybook/cobol
Assembler dummy section files path : /users/xsdf/v2/copybook/assembler
|