This general macro is a standardized TPF function for tokenizing input
commands. It allows the command support routine to define to the
tokenizer the expected format and values of an input message in a standardized
way. This allows all input messages to be processed in a standard way
and simplifies the operator interface and user factors.
A standard input command has 'Z' as the first character followed
immediately by a blank or a 1- to 4-character secondary action code.
The secondary action code either ends the message or is followed by a
blank. For more information about the standard format of an input
command see TPF Programming Standards.
The BPKDC macro is used in conjunction with the BPPSC macro to define the
input message format. (See BPPSC-Static Positional List Build for additional information.)
To define the input message format, the message processor program issues
two macros that build the tables required by the tokenizer program. The
definition form of BPKDC is used to define the actual message input
format. The macro BPPSC is used to define allowable values for a
specific positional parameter.
When the input message processor is given control, it invokes the tokenizer
program by issuing the execute form of the BPKDC macro. The tokenizer
builds an output parameter list that contains pointers to each of the tokens
found in the input message. The sequence of output pointers is
determined by the sequence of definitions in the input BPKDC. Also, if
requested, the tokenizer performs some simple conversion of input parameters
to usable binary output values.
When an error is encountered, the action taken by the tokenizer will depend
upon the options specified on the BPKDC macro. One of the following
actions will occur:
- Send an error response to the inputting terminal and exit the ECB
- Send an error response and return to the calling program
- Bypass sending an error response and return to the calling program.
Format
- label
- A symbolic name can be assigned to the macro statement.
- EXECUTE=YES
- This parameter is used to define the form of the BPKDC macro being
specified. If EXECUTE=YES, then the macro expands into a invocation of
the BPKDC tokenizer program. If this is not an execute form, then the
execute keyword should not be specified.
- BPKD=label|Rx
- The label of the definition BPKDC to be used to tokenize the input message
on level 0. It may be specified as either a label or a register
parameter.
- ERROR=label
- An optional parameter to indicate where to branch to if an error occurs in
parsing the input. If it is not entered, then the tokenizer program
will exit the ECB with an appropriate error message to the inputting
terminal.
- EMSG=Y|N
- An optional parameter, which can be coded only with the ERROR parameter,
to indicate whether an error will cause an error message to be issued to the
inputting terminal before returning to the calling segment. The default
is EMSG=N.
- HELP=label
- An optional parameter to indicate where to branch if the word
'HELP' or the character '?' appears as the first
parameter.
- type
- A set of letters which define the parameter type and conversion to be
performed. The following type codes are valid:
- P - positional parameter
- K - keyword parameter
- S - self-defining parameter
- R - parameter is required
- L - conversion character that follows is in the long (extended) format
- C - character string
- H - hexadecimal number is to be converted to binary
Maximum input value length is 8. The input will be treated as a
number which can contain an odd number of hex characters and will on output be
right-justified in the output field.
When specified with the L type code, the maximum input value length is
16. The input will be handled as a number that can contain an odd
number of hexadecimal characters and will, on output, be right-justified in
the output field.
- D - decimal number to be converted to binary
Maximum input value length is 8. The input will be treated as a
number and will on output be right-justified in the output field.
- X - hexadecimal character string is to be converted to binary
Maximum input value length is 254. The input will be treated as a
hexadecimal character string, which must contain an even number of hexadecimal
characters.
- Not X, H, D, C or the period formats.
Maximum input value length is 255. The input will be treated as a
character string.
The following rules about usage of the type codes apply:
Either P or K must be specified.
P and K are mutually exclusive.
L is valid only when H is specified.
X, H, D, S, and C are mutually exclusive.
- Note:
- The parameter definition fields are determine by the type code assigned to
the parameter. The following are the legal field definitions by type
codes:
P - (type,name,,mxplgh)
PS - (type,name,pslabel)
K - (type,keyword,mklgh,mxplgh)
KS - (type,keyword,mklgh)
- name
- This is the name of the parameter as represented in the operator's
guide. This name is used as a parameter for any error messages issued
for this parameter. It must consist of 14 or fewer alphanumeric
characters.
- keyword
- This is the keyword name as represented in the operator's
guide. The value specified is the value that will be accepted as the
keyword by the tokenizer. It must consist of 14 or fewer alphanumeric
characters. This name is also used as a parameter for any error
messages issued for this parameter.
- mklgh
- This is the minimum length acceptable for the name of a keyword
parameter. This value must be less than the length of the keyword
name.
- pslabel
- This is the name of a BPPSC macro which defines the accepted terms for a
PS (self-defining positional) type of parameter.
- mxplgh
- This is the maximum input length for a legal parameter value.
- MNOTE
- This specifies whether BPKDC is to generate MNOTE messages describing the
output DSECT label to be used to access each specified input parameter.
The default is N.
- Y
- Generate MNOTE messages.
- N
- Do not generate MNOTE messages.
Entry Requirements
The tokenizer program expects data level 0 to contain the input command
block in a MI0MI format. It also expects data level 1 and the extended
switch EBXSW0 to be available for use.
Return Conditions
- The output of the tokenizer program is a pointer in R1 to the BPKDC output
parameter list as defined in DCTBPK. The original message block from
level 0 has been released and a new 4K block will resided on level 0.
The output parameter list is contained in the 4K block.
- If an error occurs during the macro execution and the ERROR parameter has
been entered, then a branch will be taken to that label in the calling
segment. Data level 0 will still contain the input command block and
Data level 1 will be available for use.
- If the HELP parameter is coded, a branch will be taken to that label in
the calling segment. The original message block will be returned on D0
and there is no output parameter list generated.
- R0-R7, R14 and R15 are considered to be work registers and are not saved
or restored over the call to the tokenizer. The tokenizer uses the
register save area CE1UR0-CE1URB as a work area.
- The extended switch EBXSW0 has been cleared.
Programming Considerations
- This macro can be executed on any I-stream.
- Because of character restrictions on some terminals, the dollar sign
character ($) can be used in place of the quote character (').
Using a single $ in a string results in the $ being translated into a quote
mark. To use $ without translation two must be used together:
$$.
The string $This is a string$ translates into 'This is a
string'.
The string $This is a $$string$ translates into 'This is a
$string'.
- The following is a list of input command syntax rules for the BPKDC
macro:
- BPKDC syntax assigns the following characters special syntax
definitions:
- ' ' (blank)
- Token delimiter
- ',' (comma)
- Token delimiter
- '/' (slash)
- Token delimiter
- '.' (period)
- Special delimiter
- '-' (hyphen)
- Keyword character definition
- '=' (equal)
- Keyword character definition
- ''' (quote)
- Quoted character string delimiter
- #EOM
- End of input message character
- ''''
- Double quotes, result in single quote in output
- BPKDC syntax recognizes two types of parameters:
- Positional parameters are those that must be entered in a specific
position of an input message.
ZDSMG ACTION SDA ...
- ACTION is positional and must always be the first parameter.
- SDA is positional and must always be the second parameter.
- Keyword parameters are those whose value is determined by having the
keyword name assigned to the value. Keyword parameters can be entered
in any order as long as they are entered after all positional
parameters.
ZSIPC ALTER INTERVAL TIME-xx PRIM=ccc ALTERN-xx
- ALTER is positional and must always be the first parameter
- INTERVAL is positional and must always be the second parameter
- TIME is a keyword and can be entered in any position other then the first
or second.
- PRIM is a keyword and can be entered in any position other then the first
or second.
ZSIPC TIME-xx PRIM-xxx ALTER INTERVAL
The above is invalid because the keywords were entered before the required
positional parameters.
- Parameters are delimited by either a blank, a comma, or a slash.
Multiple delimiters between parameters will be deleted. Since TPF
syntax does not currently support a null positional parameter, all multiple
delimiters will be deleted.
A B,C contains three parameters A, B and C
A , B contains two parameters A and B
A ,, B contains parameters A and B and the null parameter
is ignored.
- The period (.) is a special delimiter that ties two parameters
together. (See type definitions.)
- All leading and trailing blanks will be deleted from each
parameter.
- A keyword is an alphanumeric character string of 14 characters or less,
and it can end with a single occurrence of a '-' or a
'='.
- There are two forms of keywords:
- Keywords that require a value
- Keywords that are self-defining and require no additional
parameter.
- Keywords that require a value are entered in the following form:
Keyword name= value
or
Keyword name- value
There can be no intervening blanks between the keyword and the
character '-' or '='. There can be blanks between the
character '-' or '=' and the value to be assigned to the
keyword. The following are valid keyword parameters:
KEY-aaaa
KEY- aaaaa
The following are not valid:
KEY - xxxxxxx blank between KEY and '-'
KEY -xxxxxx blank between KEY and '-'
KEY--xxxxxx multiple occurrence of '-'.
A null value can be entered for a keyword by entering the keyword followed
by a comma:
KEY- , comma causes null value for keyword
- Self-defining keywords can take one of only two values: a YES value,
which is the keyword name; or a NO value, which is the keyword name
preceded by the characters 'NO'.
keyword is ERASE
if ERASE entered, then value assigned is 'Y'
if NOERASE entered, then value assigned is 'N'
- If a keyword is entered more than once, then the value assigned is the
last entered value.
KEY-A KEY-DD DD is the value assigned to KEY.
KEY-A, KEY-, KEY will be assigned a null value
- Quoted character strings are character strings that start with a quotation
mark and end with a quotation mark. Quoted character strings can
contain any character except the #EOM character or a single quote. If a
quote is to be entered as an input character, it must be doubled. The
dollar sign ($) character can be used as an alternative to single quotes for
terminals that do not support the single quote.
'adada=adad=' is a valid quoted character string
'adadad'afafa' is not a valid character string
'adadad''afafa' is a valid character string which
contains single quote as part of the string.
- The output parameter list (DCTBPK) consists of a series of fullwords that
will contain either 0 (no parameter entered), an index value (for
self-defining positional parameters) or an address, which points to either a
fullword value containing the converted input parameter, a character string
preceded by a 1-byte length field, or a doubleword, where each fullword
contains an address which points to either a fullword value or a character
string preceded by a length byte. The form of the output parameter
returned is determined by the type of parameter and whether conversion was
requested.
The number of output fullwords is always two more then the number of
defined parameters in the BPKDC used to tokenize the input message. The
tokenizer places a count of output parameters in the first word of the output
parameter list. The second word always points to the 4-character Z
message secondary action code. That is, ZPROC the second word, would
point to the 4-character string 'PROC'. The next word would
start the parameters in the sequence defined in the BPKDC macro.
Therefore, for the BPKDC definition:
BPKD1 BPKDC (PSR,action,list1),(PSR,subject,list2),(KDR,pid,,2)
LIST1 BPPSC (DISPLAY,1),(ALTER,1)
LIST2 BPPSC (MASS,1),(STATUS,1)
The output parameter list for the following command:
ZPROC D S PID=01
would look like the following:
PLIST Description Value
word1 - count of parameters - 00000004
word2 - address of character string - x'04',c'PROC'
word3 - index to Display in LIST1 - 00000004
word4 - index to Status in LIST2 - 00000008
word5 - address of fullword set to - 00000001
Where:
- Word1 is the count of output parameters being returned by the
tokenizer.
- Word2 is the address of the character string defining the input message
suffix, which in this case is c'PROC'.
- Word3 contains the index value of the valid parameter specified for
position 1 and found in the self-defining positional list built using the
BPPSC macro. If the action word value had been 'ALTER' the
index value would have been an '8'.
- Word4 contains the index value of the valid parameter specified for
position 2 and found in the self-defining positional list built using the
BPPSC macro. If the subject word value had been 'MASS' the
index value would have been a '4'.
- Word5 contains the address of a fullword that contains the binary value of
the converted decimal input parameter specified for keyword
'PID'.
- The following type codes define the type of input data expected. A
parameter is defined as either a positional (Type code=P) or as a keyword(Type
code=K) parameter. The following are valid for both keywords and
positionals:
- C
- The output value for a type 'C' is a pointer to a character
string, where the first byte of the string is the length of the string.
word= address -> lccccccccccccc (character string)
- Note:
- The character type is the default type. If no other type code is
specified, BPKDC will expect a character string.
- H
- The output value for a type 'H' is a pointer to a fullword
containing the binary equivalent of the entered hexadecimal number,
right-justified.
word= address -> hhhhhhhh
- HL
- The output value for a type 'HL' is a pointer to a doubleword
containing the binary equivalent of the entered hexadecimal number,
right-justified.
word= address -> hhhhhhhhhhhhhhhh
- D
- The output value for a type 'D' is a pointer to a fullword
containing the binary equivalent of the entered decimal number,
right-justified.
word= address -> dddddddd
- X
- The output value for a type 'X' is a pointer to a character string
containing the binary equivalent of the entered hexadecimal character string
preceded by one byte containing the length of the string. The input
string must contain an even number of characters.
word= address -> lxxxxxxxxxxxxxxxx
- C.H
- The output value for a type 'C.H' is a pointer to a
doubleword, where the first fullword contains a pointer to a character string
where the first byte of the string is the length of the string. The
second fullword contains a pointer to a fullword containing the binary
equivalent of the hexadecimal number, right justified.
word= address-> address -> lcccccccc (character string)
address -> hhhhhhhh
- Note:
- This type can handle the following input formats:
- chr1.hex2, where chr1 is a character string and hex2 is a
hexadecimal number
- chr1. or chr1
- .hex2
- Note:
- If one of the parameters is not entered, then it's corresponding
fullword in the doubleword will contain zeros.
- H.H
- The output value for a type 'H.H' is a pointer to a
doubleword, where the first fullword contains a pointer to a fullword
containing the binary equivalent of the first hexadecimal number, right
justified. The second fullword contains a pointer to a fullword
containing the binary equivalent of the second hexadecimal number, right
justified.
word= address-> address -> hhhhhhhh
address -> hhhhhhhh
- Note:
- This type can handle the following input formats:
- hex1.hex2, where hex1 and hex2 are two hexadecimal numbers
- hex1. or hex1
- .hex2
- HL.H
- The output value for a type 'HL.H' is a pointer to a
doubleword where, the first fullword contains a pointer to a doubleword
containing the binary equivalent of the first hexadecimal number, right
justified. The second fullword contains a pointer to a fullword
containing the binary equivalent of the second hexadecimal number, right
justified.
word= address-> address -> hhhhhhhhhhhhhhhh
address -> hhhhhhhh
- Note:
- This type can handle the following input formats:
- hex1.hex2, where hex1 and hex2 are two hexadecimal numbers
- hex1. or hex1
- .hex2
- D.H
- The output value for a type 'D.H' is a pointer to a
doubleword, where the first fullword contains a pointer to a fullword
containing the binary equivalent of the decimal number, right
justified. The second fullword contains a pointer to a fullword
containing the binary equivalent of the hexadecimal number, right
justified.
word= address-> address -> dddddddd
address -> hhhhhhhh
- Note:
- This type can handle the following input formats:
- dec1.hex2, where dec1 is a decimal number and hex2 is a hexadecimal
number
- dec1. or dec1
- .hex2
- X.H
- The output value for a type 'X.H' is a pointer to a
doubleword, where the first fullword contains a pointer to a character string
containing the binary equivalent of the entered hexadecimal number, where the
first byte of the string is the length of the string. The second
fullword contains a pointer to a fullword containing the binary equivalent of
the hexadecimal number, right justified.
word= address-> address -> lxxxxxxxx
address -> hhhhhhhh
- Note:
- This type can handle the following input formats:
- xxx1.hex2, where xxx1 is a hexadecimal character string and hex2 is
a hexadecimal number
- xxx1. or xxx1
- .hex2
- C.D
- The output value for a type 'C.D' is a pointer to a
doubleword, where the first fullword contains a pointer to a character string
where the first byte of the string is the length of the string. The
second fullword contains a pointer to a fullword containing the binary
equivalent of the decimal number, right justified.
word= address-> address -> lcccccccc (character string)
address -> dddddddd
- Note:
- This type can handle the following input formats:
- chr1.dec2, where chr1 is a character string and dec2 is a decimal
number
- chr1. or chr1
- .dec2
- H.D
- The output value for a type 'H.D' is a pointer to a
doubleword, where the first fullword contains a pointer to a fullword
containing the binary equivalent of the first hexadecimal number, right
justified. The second fullword contains a pointer to a fullword
containing the binary equivalent of the decimal number, right
justified.
word= address-> address -> hhhhhhhh
address -> dddddddd
- Note:
- This type can handle the following input formats:
- hex1.dec2, where hex1 is a hexadecimal number and dec2 is a decimal
number
- hex1. or hex1
- .dec2
- HL.D
- The output value for a type 'HL.D' is a pointer to a
doubleword, where the first fullword contains a pointer to a doubleword
containing the binary equivalent of the first hexadecimal number, right
justified. The second fullword contains a pointer to a fullword
containing the binary equivalent of the decimal number, right
justified.
word= address-> address -> hhhhhhhhhhhhhhhh
address -> dddddddd
- Note:
- This type can handle the following input formats:
- hex1.dec2, where hex1 is a hexadecimal number and dec2 is a decimal
number
- hex1. or hex1
- .dec2
- D.D
- The output value for a type 'D.D' is a pointer to a
doubleword, where the first fullword contains a pointer to a fullword
containing the binary equivalent of the first decimal number, right
justified. The second fullword contains a pointer to a fullword
containing the binary equivalent of the second decimal number, right
justified.
word= address-> address -> dddddddd
address -> dddddddd
- Note:
- This type can handle the following input formats:
- dec1.dec2, where dec1 and dec2 are two decimal numbers
- dec1. or dec1
- .dec2
- X.D
- The output value for a type 'X.D' is a pointer to a
doubleword, where the first fullword contains a pointer to a character string
containing the binary equivalent of the entered hexadecimal number, where the
first byte of the string is the length of the string. The second
fullword contains a pointer to a fullword containing the binary equivalent of
the decimal number, right justified.
word= address-> address -> lxxxxxxxx
address -> dddddddd
- Note:
- This type can handle the following input formats:
- xxx1.dec2, where xxx1 is a hexadecimal character string and dec2 is
a decimal number
- xxx1. or xxx1
- .dec2
- C.X
- The output value for a type 'C.X' is a pointer to a
doubleword, where the first fullword contains a pointer to a character string
where the first byte of the string is the length of the string. The
second fullword contains a pointer to a character string that contains the
binary equivalent of the entered hexadecimal string, where the first byte is
the length of the string.
word= address-> address -> lcccccccc (character string)
address -> lxxxxxx
- Note:
- This type can handle the following input formats:
- chr1.xxx2, where chr1 is a character string and xxx2 is a
hexadecimal string.
- chr1. or chr1
- .xxx2
- H.X
- The output value for a type 'H.X' is a pointer to a
doubleword, where the first fullword contains a pointer to a fullword
containing the binary equivalent of the entered hexadecimal number, right
justified. The second fullword contains a pointer to a character string
that contains the binary equivalent of the entered hexadecimal string, where
the first byte is the length of the string.
word= address-> address -> hhhhhhhh
address -> lxxxxxx
- Note:
- This type can handle the following input formats:
- hex1.xxx2, where hex1 is a hexadecimal number and xxx2 is a
hexadecimal string.
- hex1. or hex1
- .xxx2
- HL.X
- The output value for a type 'HL.X' is a pointer to a
doubleword, where the first fullword contains a pointer to a doubleword
containing the binary equivalent of the entered hexadecimal number, right
justified. The second fullword contains a pointer to a character string
that contains the binary equivalent of the entered hexadecimal string, where
the first byte is the length of the string.
word= address-> address -> hhhhhhhhhhhhhhhh
address -> lxxxxxx
- Note:
- This type can handle the following input formats:
- hex1.xxx2, where hex1 is a hexadecimal number and xxx2 is a
hexadecimal string
- hex1. or hex1
- .xxx2
- D.X
- The output value for a type 'D.X' is a pointer to a
doubleword, where the first fullword contains a pointer to a fullword
containing the binary equivalent of the entered decimal number, right
justified. The second fullword contains a pointer to a character string
that contains the binary equivalent of the entered hexadecimal string, where
the first byte is the length of the string.
word= address-> address -> dddddddd
address -> lxxxxxx
- Note:
- This type can handle the following input formats:
- dec1.xxx2, where dec1 is a decimal number and xxx2 is a hexadecimal
string.
- dec1. or dec1
- .xxx2
- X.X
- The output value for a type 'X.X' is a pointer to a
doubleword, where the first fullword contains a pointer to a character string
containing the binary equivalent of the entered hexadecimal number, where the
first byte of the string is the length of the string. The second
fullword contains a pointer to a character string containing the binary
equivalent of the entered hexadecimal number, where the first byte of the
string is the length of the string.
word= address-> address -> lxxxxxxxx
address -> lxxxxxx
- Note:
- This type can handle the following input formats:
- xxx1.xxx2, where xxx1,xxx2 are hexadecimal character strings
- xxx1. or xxx1
- .xxx2
- C.C
- The output value for a type 'C.C' is a pointer to a
doubleword, where the first fullword contains a pointer to a character string
where the first byte of the string is the length of the string. The
second fullword contains a pointer to a character string where the first byte
is the length of the string.
word= address-> address -> lcccccccc (character string)
address -> lccccc (character string)
- Note:
- This type can handle the following input formats:
- chr1.chr2, where chr1,chr2 are character strings
- chr1. or chr1
- .chr2
- H.C
- The output value for a type 'H.C' is a pointer to a
doubleword, where the first fullword contains a pointer to a fullword
containing the binary equivalent of the entered hexadecimal number, right
justified. The second fullword contains a pointer to a character
string, where the first byte is the length of the string.
word= address-> address -> hhhhhhhh
address -> lcccccc
- Note:
- This type can handle the following input formats:
- hex1.chr2, where hex1 is a hexadecimal number and chr2 is a
character string.
- hex1. or hex1
- .chr2
- HL.C
- The output value for a type 'HL.C' is a pointer to a
doubleword, where the first fullword contains a pointer to a doubleword
containing the binary equivalent of the entered hexadecimal number, right
justified. The second fullword contains a pointer to a character
string, where the first byte is the length of the string.
word= address-> address -> hhhhhhhhhhhhhhhh
address -> lcccccc
- Note:
- This type can handle the following input formats:
- hex1.chr2, where hex1 is a hexadecimal number and chr2 is a
character string.
- hex1. or hex1
- .chr2
- D.C
- The output value for a type 'D.C' is a pointer to a
doubleword, where the first fullword contains a pointer to a fullword
containing the binary equivalent of the entered decimal number, right
justified. The second fullword contains a pointer to a character
string, where the first byte is the length of the string.
word= address-> address -> dddddddd
address -> lcccccc
- Note:
- This type can handle the following input formats:
- dec1.chr2, where dec1 is a decimal number and chr2 is a character
string.
- dec1. or dec1
- .chr2
- X.C
- The output value for a type 'X.C' is a pointer to a
doubleword, where the first fullword contains a pointer to a character string
that contains the binary equivalent of the entered hexadecimal number, where
the first byte of the string is the length of the string. The second
fullword contains a pointer to a character string where the first byte is the
length of the string.
word= address-> address -> lxxxxxxxx
address -> lccccc (character string)
- Note:
- This type can handle the following input formats:
- xxx1.chr2, where xxx1 is a hexadecimal string and chr2 is a
character string
- xxx1. or xxx1
- .chr2
- C.HL
- The output value for a type 'C.HL' is a pointer to a
doubleword, where the first fullword contains a pointer to a character string
where the first byte of the string is the length of the string. The
second fullword contains a pointer to a doubleword containing the binary
equivalent of the hexadecimal number, right justified.
word= address-> address -> lccccccc (character string)
address -> hhhhhhhhhhhhhhhh
- Note:
- This type can handle the following input formats:
- chr1.hex2, where chr1 is a character string and hex2 is a
hexademcial number
- chr1. or chr1
- .hex2
- H.HL
- The output value for a type 'H.HL' is a pointer to a
doubleword, where the first fullword contains a pointer to a fullword
containing the binary equivalent of the first hexadecimal number, right
justified. The second fullword contains a pointer to a doubleword
containing the binary equivalent of the second hexadecimal number, right
justified.
word= address-> address -> hhhhhhhh
address -> hhhhhhhhhhhhhhhh
- Note:
- This type can handle the following input formats:
- hex1.hex2, where hex1 and hex2 are two hexademcial numbers
- hex1. or hex1
- .hex2
- HL.HL
- The output value for a type 'HL.HL' is a pointer to a
doubleword, where the first fullword contains a pointer to a doubleword
containing the binary equivalent of the first hexadecimal number, right
justified. The second fullword contains a pointer to a doubleword
containing the binary equivalent of the second hexadecimal number, right
justified.
word= address-> address -> hhhhhhhhhhhhhhhh
address -> hhhhhhhhhhhhhhhh
- Note:
- This type can handle the following input formats:
- hex1.hex2, where hex1and hex2 are two hexademcial numbers
- hex1. or hex1
- .hex2
- D.HL
- The output value for a type 'D.HL' is a pointer to a
doubleword, where the first fullword contains a pointer to a fullword
containing the binary equivalent of the decimal number, right
justified. The second fullword contains a pointer to a doubleword
containing the binary equivalent of the hexadecimal number, right
justified.
word= address-> address -> dddddddd
address -> hhhhhhhhhhhhhhhh
- Note:
- This type can handle the following input formats:
- dec1.hex2, where dec1 is a decimal number and hex2 is a hexademcial
number
- dec1. or dec1
- .hex2
- X.HL
- The output value for a type 'X.HL' is a pointer to a
doubleword, where the first fullword contains a pointer to a character string
containing the binary equivalent of the entered hexadecimal number, where the
first byte of the string is the length of the string. The second
fullword contains a pointer to a doubleword containing the binary equivalent
of the hexadecimal number, right justified.
word= address-> address -> lxxxxxxxx
address -> hhhhhhhhhhhhhhhh
- Note:
- This type can handle the following input formats:
- xxx1.hex2, where xxx1 is a hexadecimal character string and hex2 is
a hexademcial number
- xxx1. or xxx1
- .hex2
- Null
- If the parameter was not specified and was not a required parameter, its
location in the output parameter list will contain a word of 0s.
- S
- When specified with a keyword parameter (KS), the output value is a
pointer to a one byte character string containing either the character
'Y' or 'N' depending on the input value. The character
will be preceded by a length byte of value 1.
word= address -> xc (where c is either Y/N)
When specified with a positional parameter (PS), the output value is an
index modular 4 where the index value is determined by the parameter's
position in the list built by the specified BPPSC macro. If found, the
index will always be equal to or greater then 4.
word= fullword index value 4 or greater.
The following are some examples of type codes and the expected input:
- PHR - The expected input is a required positional parameter which is a
hexadecimal number.
- KD - The expected input is a keyword whose value will be a decimal
number. It is not a required parameter.
- PX.X - the expected input is two hexadecimal strings, separated by
a period. It is not a required parameter.
- KC.CR - the expected input is a keyword whose value is two
character strings separated by a period. This parameter is
required.
Examples
- Start message processing
SPACE 1
*
* FIRST BPKDC IS USED TO START MESSAGE PROCESSING AND WILL HANDLE
* A ZMCPY RESTART MESSAGE.
*
SPACE 1
MCPYBPKD BPKDC (PSR,TYPE,TYPEBPK2)
TYPEBPK2 BPPSC (ABORT,2,BPKD2),(RESTART,1),(ALL,,BPKD3)
SPACE 1
- ZMCPY ABORT handling
*
* THIS BPKDC WILL HANDLE A ZMCPY ABORT BP MESSAGE
*
SPACE 1
BPKD2 BPKDC (PSR,TYPE,TYPEBPK2),(KS,BP)
SPACE 1
- ZMCPY ALL handling
*
* THIS BPKDC WILL HANDLE A ZMCPY ALL XXXX TO XXXX MESSAGE
*
SPACE 1
BPKD3 BPKDC (PSR,TYPE,TYPEBPK2), X
(PHR,FROMSDA,,4), X
(PSR,TO,TOBPK2), X
(PHR,TOSDA,,4)
TOBPK2 BPPSC TO
The BPKDC 'MCPYBPKD' is used to start the input message
processing. The first parameter expected is a self-defining positional,
and the legal values are defined by the TYPEBPK2 BPPSC macro. If either
'ABORT' or 'ALL' is entered then a switch to another BPKDC
takes place. 'ABORT' causes a switch to the BPKDC with label
'BPKD2' and 'ALL' causes a switch to the BPKDC
'BPKD3'. If 'RESTART' is entered then processing
continues with this BPKDC. If the entered value is not one of these,
the request is cancelled and either the ECB is exited or control is passed
back to the calling segment depending on if the ERROR parameter was coded on
the execution form.
By providing a switch capability, it is possible to restrict input
parameters to those commands on which the input parameters are valid.
In this example, ZMCPY ABORT BP, the BP keyword is only allowed when
'ABORT' has been specified. Therefore if it is entered on one
of the other types of ZMCPY, it will not be accepted as valid because the
BPKDCs for those messages do not have the 'BP' defined for
them.
The 'ALL' case shows another reason for the BPKDC switch. It
allows the input parameters to be defined as to the conversion to be performed
on them. The 'FROMSDA' and the 'TOSDA' are entered as
hexadecimal input, and this BPKDC specifies that they are to be converted to
binary hexadecimal numbers. Also the 'TO' PS parameter allows
the command to be tested for correct syntax. The 'TO' value can
only be 'TO' (as defined in the BPPSC) and must be specified.
If it is not entered, or not entered as 'TO' then an error message is
written and the request is cancelled. This fulfills the syntax checking
required by the operator's guide.
- Note:
- When doing BPKDC switching as in the above paragraph, the BPKDC parameter
definitions before the switch point must be the same in all the possible
branch to BPKDCs. In other words, if the switch parameter is the third
parameter, the first two parameter definitions must be the same in the BPKDC
statements. In the above example the first parameter definition is
repeated in each of the three BPKDCs. This is required because the
tokenizer does not change input or output parameter displacements when it
performs a BPKDC switch. It assumes that it will start processing the
new BPKDC at the same displacement it would have continued with in the old
BPKDC if no switch had occurred.