All: I have a question regarding inbound ASCII data.
We read ASCII data via a EZASOKET READ call. The data is encrypted , so we decrypt it and then convert to EBCDIC. I looked at FTP data and there is a SBDATACON parameter..giving both EBCDIC and ASCII ccsids or codepages. My problem/issue is: I dont know what the inbound ASCII data stream codepage is ...after a encrypt/Decrypt using AES128 or AES256. I have created a temporary fix to resolve it in our STC usin a CODEPAGE= which is the ASCII codepage. We have been using EZACIC14/15 from the IP Socket Programmer's guide. I am looking for a univeral way to do the conversion, I know I can do NLS and use something like below: CBL DBCS,NSYMBOL(NATIONAL) IDENTIFICATION DIVISION. PROGRAM-ID. MAIN1. ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-AREA PICTURE N(50). 01 WS-CCSID PICTURE 9(5). 01 WS-ASCII PICTURE X(50). 01 WS-EBCDIC PICTURE X(50). PROCEDURE DIVISION. MOVE "ABCDE" TO WS-EBCDIC. DISPLAY " WS-EBCDIC = " WS-EBCDIC. MOVE FUNCTION NATIONAL-OF(WS-EBCDIC) TO WS-AREA. DISPLAY " WS-AREA = " WS-AREA. MOVE 819 TO WS-CCSID. MOVE FUNCTION DISPLAY-OF(WS-AREA, WS-CCSID) TO WS-ASCII. DISPLAY " WS-ASCII = " WS-ASCII. DISPLAY "Now let's convert that WS-ASCII back to EBCDIC". MOVE FUNCTION NATIONAL-OF(WS-ASCII,819 ) TO WS-AREA. DISPLAY " WS-AREA = " WS-AREA. MOVE 1140 TO WS-CCSID. MOVE FUNCTION DISPLAY-OF(WS-AREA, WS-CCSID) TO WS-EBCDIC. DISPLAY " WS-EBCDIC = " WS-EBCDIC. STOP RUN. I "assume" i could call a C or C++ routine ans use ICONV with the input codepage and output codepage acquired from a parameter in our STC. Is the parameter in the STC the best approach or am I missing something ? Regards, -- *IDMWORKS * Scott Ford z/OS Dev. “By elevating a friend or Collegue you elevate yourself, by demeaning a friend or collegue you demean yourself” www.idmworks.com scott.f...@idmworks.com Blog: www.idmworks.com/blog *The information contained in this email message and any attachment may be privileged, confidential, proprietary or otherwise protected from disclosure. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, copying or use of this message and any attachment is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and permanently delete it from your computer and destroy any printout thereof.* ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN