|
The SWSAS2EB FunctionRelated Topics
SWSAS2EB is a built-in function used to translate an ASCII character string to an EBCDIC character string. SWSAS2EB SyntaxThe SWSAS2EB function takes one or two arguments. The invocation format for SWSAS2EB is: z = SWSAS2EB( arg1 {, arg2 } ) The first argument specifies the data to be be translated. The second argument specifies the language code of the character string. This argument is optional. If not specified, the default Shadow Server language code is assumed.
Return ValuesSWSAS2EB always returns a numeric value. If the value is zero the operation has completed successfully. A non-zero return value indicates that you have specified an invalid language code. The SWSAS2EB operation creates two REXX variables containing the output translated string and the length of the output string.
ExampleThe following calls will translate an ASCII string to an EBCDIC string using the Swedish language translation table. Afterwards, the EBCDIC string will be translated back to ASCII using the default language translation table assigned to the Shadow Server address space: RC = swseb2as("ABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%,&*()_-+={}"&|","SVE") say "rc=" RC say "len=" ascii.textout.0 say "data=" ascii.textout.1 RC = swsas2eb(ascii.textout.1) say "rc=" RC say "len=" ebcdic.textout.0 say "data=" ebcdic.textout.1 |