The QRYLANG macro enables you to check if a particular language is available into which you can translate system or application messages. It can also provide a list of all active languages currently available for translation. Once you know that the language you want is available, you can issue TRANMSG to retrieve the translated message.
If you asked for a list of all available languages, QRYLANG returns an LQB with one language entry for each language.
See z/OS MVS Programming: Assembler Services Guide for more information on using QRYLANG.
The requirements for the caller are:
Environmental factor | Requirement |
---|---|
Minimum authorization: | Problem state and any PSW key |
Dispatchable unit mode: | Task or SRB |
Cross memory mode: | PASN=HASN=SASN or PASN¬=HASN¬=SASN |
AMODE: | 24- or 31-bit |
ASC mode: | Primary |
Interrupt Status: | Enabled for I/O and external interrupts |
Locks: | No locks held |
Control parameters: | Not applicable |
Before invoking QRYLANG you must allocate storage for the LQB.
None.
Some callers depend on register contents remaining the same before and after issuing a service. If the system changes the contents of registers on which the caller depends, the caller must save them before issuing the service, and restore them after the system returns control.
None.
The QRYLANG macro is written as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␢ | One or more blanks must precede QRYLANG. |
QRYLANG | |
␢ | One or more blanks must follow QRYLANG. |
LQB=lang qblock addr | lang qblock addr: RX-type address or register (2) - (12). |
,LQBLEN=length of block addr | length of block addr: RX-type address or register (2) - (12). |
,LANGNAME=lang addr | lang addr: RX-type address or register (2) - (12). |
The parameters are explained as follows:
When QRYLANG completes, register 15 contains one of the following hexadecimal return codes:
Hexadecimal Code | Meaning |
---|---|
00 | Processing completed successfully. |
04 | Processing did not complete, and storage is not freed. |
08 | Processing is complete but QRYLANG returned an incomplete LQB to the calling program. For example, the requested language may not be available. |
0C | Processing did not complete. The output is unusable. |
10 | The function did not complete. The output LQB is unusable. |
The low-order halfword of register 0 contains the following hexadecimal reason codes from QRYLANG:
Hexadecimal Return Code | Hexadecimal Reason Code | Meaning |
---|---|---|
00 | 00 | Successful processing. |
04 | 07 | This reason code is for internal diagnostic purposes only. Record it and supply it to the appropriate IBM® support personnel. |
04 | 08 | This reason code is for internal diagnostic purposes only. Record it and supply it to the appropriate IBM support personnel. |
04 | 0B | This reason code is for internal diagnostic purposes only. Record it and supply it to the appropriate IBM support personnel. |
04 | 0C | The passed storage address is not valid. |
04 | 0D | This reason code is for internal diagnostic purposes only. Record it and supply it to the appropriate IBM support personnel. |
08 | 0F | There is insufficient LQB storage for LQB entries. |
08 | 2C | The language you requested is not available. |
0C | 0A | No storage was obtained. |
0C | 16 | The LQB is too small to handle returned data. |
0C | 17 | The MVS™ message service is not available. |
0C | 26 | The query request terminated. The MMS user exit has set the processing indicator to a nonzero value. |
0C | 27 | The entry installation exit has failed. |
0C | 28 | The exit installation exit has failed. |
0C | 2D | The acronym of the control block created when invoking QRYLANG is not "LQB" and is therefore not valid. |
0C | 2E | The length of the LQB is not valid. |
0C | 2F | QRYLANG was unable to move the LQB from the caller's address space. |
0C | 30 | QRYLANG was unable to move the LQB to the caller's address space. |
10 | 09 | This reason code is for internal diagnostic purposes only. Record it and supply it to the appropriate IBM support personnel. |
QUERY2A CSECT
QUERY2A AMODE 31
QUERY2A RMODE ANY
STM 14,12,12(13)
BALR 12,0
USING *,12
ST 13,SAVE+4
LA 15,SAVE
ST 15,8(13)
LR 13,15
* *
***********************************************************************
* OBTAIN STORAGE AREA FOR INSTLCB AND LQB *
***********************************************************************
* *
GETMAIN RU,LV=STORLEN,SP=SP228
* *
LR R3,R1 SAVE ADDRESS OF STORAGE AREA
ST R3,CVTUSER-CVT(R2) ANCHOR INSTALLATION CONTROL BLOCK C
FROM GLOBAL COMMUNICATIONS WORD C
IN MCA CONTROL BLOCK
XC 0(STORLEN,3),0(3) CLEAR STORAGE AREA
MVC INSTLACR-INSTLCB(4,R3),=C'INST' SET ACRONYM IN C
INSTALLATION CONTROL BLOCK
LA R4,INSTLLEN(,R3) OBTAIN ADDRESS OF LQB
LA R5,LQBLEN GET LQB LENGTH
* *
QRYLANG LANGNAME=JPN_CODE,LQB=(R4),LQBLEN=(R5)
* *
LTR R15,R15 IS JAPANESE AVAILABLE
BNZ END NO, EXIT
OI INSTLFLG-INSTLCB(R3),INSTLJPN YES, SET AVAIL. FLAG
*
***********************************************************************
* RETURN *
***********************************************************************
*
END DS 0H
L 13,SAVE+4
LM 14,12,12(13)
BR 14
***********************************************************************
JPN_CODE DC CL24'JPN'
SAVE DC 18F'0'
SP228 EQU 228
LQBLEN EQU (LQBVDAT-LQB)+LQBEBL
STORLEN EQU INSTLLEN+LQBLEN
R1 EQU 1
R2 EQU 2
R3 EQU 3
R4 EQU 4
R5 EQU 5
R15 EQU 15
***********************************************************************
DSECT
CVT DSECT=YES
CNLMMCA
CNLMLQB
INSTLCB DSECT INSTALLATION CONTROL BLOCK
INSTLACR DS CL4'INST' INSTALLATION CONTROL BLOCK ACRONYM
INSTLFLG DS X LANGUAGE AVAILABILITY FLAGS
INSTLJPN EQU X'80' JAPANESE IS AVAILABLE
DS CL23 RESERVED
INSTLLEN EQU *-INSTLCB
END QUERY2A