Get Job National Language Support
The GetJobNLS procedure returns current settings for the job's
national language support features.
This procedure returns the CCSID, default CCSID, Language Code,
Country Code and job date format for the specified job.
returned attr count = GetJobNL(
szJob 26A CONST Options(*NOPASS:*OMIT)
nCCSID 10I 0 Options(*NOPASS:*OMIT)
szLangID 3A Options(*NOPASS:*OMIT)
szCountryCode 2A Options(*NOPASS:*OMIT)
nDftCCSID 10I 0 Options(*NOPASS:*OMIT)
szDateFmt 5A Options(*NOPASS:*OMIT)
)
|
|
|
Parameters
- szJob [ optional ] DFT('*')
- [input Char(26) const] The qualified job name or '*' for
the current job. If a fully qualified job is specified, it must be in
the same format as that required by CL commands. For example:
-
*...v....1....v....2....V.
-
'DSP01 QPGMR 021387'
-
-
An alternative syntax is also
supported for the szFile parameter. The alternate syntax allows you to
specify the file name using qualified syntax. This is similar to that of an OS/400 CL command.
The file may be qualified using qualified name syntax, as follows:
-
*...v....1....v....2.
-
'PRODLIBR/CUSTMAST '
Returned Parameters
- nCCSID [ optional ]
- [ input Int4(10i0) ] Specify a return variable that is
defined as 10i0 (int4) to receive the CCSID for the job identified on
the szJob parameter. If you do not need the CCSID for the job, specify
*OMIT for this parameter or specify a dummy/work variable and ignore
the returned value.
- szLangID [ optional ]
- [ input Char(3) ] Specify a return variable that is defined
as Char(3) to receive the language code for the job identified on the
szJob parameter. If you do not need the Language Code for the job,
specify *OMIT for this parameter or specify a dummy/work variable and
ignore the returned value. If only the CCSID is needed, this parameter
and all subsequent parameters may be unspecified.
- szCountryCode [ optional ]
- [ input Char(2) ] Specify a return variable that is defined
as Char(2) to receive the country code for the job identified on the
szJob parameter. If you do not need the Country Code for the job,
specify *OMIT for this parameter or specify a dummy/work variable and
ignore the returned value. If only the CCSID or szLangID are needed,
this parameter and all subsequent parameters may be unspecified.
- nDFTCCSID [ optional ]
- [ input Int4(10i0) ] Specify a return variable that is
defined as 10i0 (int4) to receive the Default CCSID for the job
identified on the szJob parameter. If you do not need the Default
CCSID for the job, specify *OMIT for this parameter or specify a
dummy/work variable and ignore the returned value.
- szDateFormat [ optional ]
- [ input Char(5) ] Specify a return variable that is defined
as Char(5) to receive the date format and date separator for the job
identified on the szJob parameter. If you do not need the Date Format
and Separator for the job, specify *OMIT for this parameter or specify
a dummy/work variable and ignore the returned value.
Return Value
If the function succeeds, the return value is the number of National
Language attributes returned to the caller. Otherwise 0 is returned.
Example
/INCLUDE QCPYSRC,job
D
nCCSID
S
10I
0
D
szLangID
S
3A
D
szCountryID
S
2A
D
nDFTCCSID
S
10I
0
D
szDateFmt
S
5A
C
callp
GetJobNL('*':nCCSID)
C
callp
GetJobNL('*':*OMIT:*OMIT:*OMIT:szDateFmt)
In this example, the CCSID for the job is returned
to the 2nd parameter of the call to GetJobNL on the first calc
specification.
The second Calc spec calls GetJobNL to retrieve
only the job's Date Format and Separator.