![]() |
![]() |
![]() |
![]() |
![]() |
The COBOL copy file CONVERTMW.cpy stores the correspondence between source z/OS hexadecimal values and target UNIX/Linux hexadecimal values. The copy file is used by all of the COBOL reloading files generated by Oracle Tuxedo Application Rehosting Workbench (Tuxedo ART Workbench) data conversion tools when transcoding z/OS characters to UNIX characters.Retrieve the REFCOD80 file from <refinedir>/<release>/convert-data/codeset-tool and transfer it in BINARY format to a z/OS PDS with a RecordLength = 80 parameter. This type of PDS is commonly used to stock JCL and COBOL components.The REFCOD80 file contains a list of all the characters in the EBCDIC alphabet. Each line in the file has the following format:Listing 2‑1 REFCOD80 File ExampleThe transfer in binary mode is mandatory because the file is stored in z/OS format on the UNIX/Linux platform, and the contents should not be altered;A VIEW under TSO is sufficient to look at the file.The following pictures are screen captures of the complete REFCOD80 file using a test monitor.Figure 2‑1 REFCOD80 File From Test Monitor: Part 1Figure 2‑2 REFCOD80 file from test monitor: Part 2Figure 2‑3 REFCOD80 file from test monitor: Part 3Figure 2‑4 REFCOD80 file from test monitor: Part 4
Notes: The first screen captures do not show any graphic characters under CAR:/ /, because these characters do not have a graphical representation under z/OS.
• The characters displayed on this screen must be in line with the character set that has been chosen.The COBOL CONVERTMW.cpy file is located in <refinedir>/<release>/convert-data/codeset-tool. The copy file is used by reloading scripts of Tuxedo ART Workbench data tools to convert character strings from EBCDIC to ASCII along with the DB2 table data and the VSAM/SAM files.Listing 2‑2 COBOL CONVERTMW.cpy Copy File Supplied Code
• A description and COBOL comment part and the definition of two COBOL variables: TRANSCODE-INFO containing information about the project and TRANSCODE-LENGTH containing a constant that must not be modified.
• The TRANSCODE-SOURCE variable represents the 256 hexadecimal values of the source platform.
• The TRANSCODE-CIBLE COBOL variable contains 256 hexadecimal values corresponding to the ASCII equivalents of the EBCDIC hexadecimal values stored in TRANSCODE-SOURCE.When "enable-buffer-converter" or "enable-reverse-converter" is set in system description file, to correctly compile the newly generated COBOL programs (please refer to File to File chapter), this copy file must be replaced by one of the following two files in the same directory. They both contain additional two fields:For Micro Focus COBOL, the CONVERTMW.cpy.mf file is renamed to CONVERTMW.CPY. The additional two fields are:For COBOL-IT, the CONVERTMW.cpy file .cit is renamed to CONVERTMW.CPY. The additional two fields are:
Note: Each FILLER variable contains 16 hexadecimal character pairs; that is 32 characters coded from 0 to 9 and from A to F.To view the result of the configuration of the COBOL CONVERTMW.cpy copy file, execute the show_convertmw.sh script stored in <refinedir>/<release>/convert-data/codeset-tool using the location and name of the copy file as a parameter:
Note: This script requires the initialization of the TMPPROJECT UNIX variable. For example:The script produces a list of all of the characters in the ASCII alphabet sorted in exactly the same manner as the REFCOD80 file viewed under z/OS. Each line displayed has the following format:Listing 2‑3 UNIX Character ExampleListing 2‑4 Complete UNIX Character ListAn adaptation consists in modifying the hexadecimal value stored in the TRANSCODE-CIBLE variable of the COBOL CONVERTMW.cpy copy file.Look for the original hexadecimal value in the TRANSCODE-SOURCE section by reading the characters in pairs.Using a hypothetical example, where under z/OS the source hexadecimal character EA is not "² " but "# ".Figure 2‑5 Looking for z/OS Character Part 1The string "ea" can be found on the sixth and eighth lines. Which string should be chosen?Figure 2‑6 Looking for z/OS Character Part 2Once the hexadecimal value has been found in the z/OS file, it is easy to retrieve the value of the variable TRANSCODE-CIBLE that is situated in the same location (8th line, 21st character) of TRANSCODE-SOURCE. Using the show_convertmw.sh script we can see that the hexadecimal value in the TRANSCODE-CIBLE is "b2".The value “b2” should be modified to the hexadecimal equivalent of “ #”. The hexadecimal value is “23”, as indicated by the file produced by running show_convertmw.sh:
• Example: can not access to directory $TMPPROJECT: $TMPPROJECT.Explanation: UNIX Variable TMPPROJECT must be set.
• File Convertor Reloading the Data.