|
The SWSEB2AS FunctionRelated Topics
SWSEB2AS is a built-in function used to translate an EBCDIC character string to an ASCII character string.
SWSEB2AS SyntaxThe SWSEB2AS function takes one or two arguments. The invocation format for SWSEB2AS is: z = SWSEB2AS( 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 ValuesSWSEB2AS 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 SWSEB2AS operation creates two REXX variables containing the output translated string and the length of the output string.
ExampleThe following calls will translate an EBCDIC string to an ASCII string using the Swedish language translation table. Afterwards, the ASCII string will be translated back to EBCDIC 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 |