|
Hi, How can I get QzhbCgiParse to format (seperators, field prefixes and field values) incoming POSTed data in the same manner that QtmhRdStin does? (NOTE: I also want to take advantage of the -F and -N flags in QzhbCgiParse to convert incoming BINARY data from one CCSID to another) I can get the QzhbCgiParse -F and -N flags to work as I want to convert incoming data from 1208 to 37, but the formatting of the data is different...see RQSDATA and ZHBBUFFER below. *** QtmhRdStin I have a CGI application that works fine and dandy with QtmhRdStin (http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzaie/rzaieapi_qtmhrdstin.htm) to read data from the Apache server. The file ccsid is 37 and the net ccsid is 819..CGI data is CGIConvMode %%EBCDIC/MIXED%% . If data has been sent via POST from the browser it appears A) with no prefix on the field name and B) the separator between fields is the ampersand, as below: EVAL RqsData RQSDATA = ....5...10...15...20...25...30...35...40...45...50...55...60 1 'W2E_SSNID=W90NIxGoSsN1023ZYW2E140876000001CLSpKfgkCJSLKsc600' 61 '001JKenjKnEDJuNX9GoVjCEbqIuKh6kFRvbzYnUxgQtONszJldyAar3LtTSw' 121 'smBLpdlPc5iDH4Zf70&_F0546U=cocsi01&_F0626U=rfv697481&_KEN=Lo' 181 'g+on ' 241 ' ' *** QtmhRdStin However if I rewrite my CGI program to use QzhbCgiParse (http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzaie/rzaieapi_qzhbcgiparse.htm)... ...and change the apache server config to CGIConvMode BINARYand convert the outgoing data to be UTF-8 (1208) (using ICONV API)... ...then when QzhbCgiParse reads the POSTed data in: A) The field names are prefixed with 'FORM_'. B) The seperator is a semi-colon, not an ampersand. C) The value of the fields is enclosed in single apostrophes. > EVAL zhbBuffer ZHBBUFFER = ....5...10...15...20...25...30...35...40...45...50...55...60 1 'FORM_W2E_SSNID='W90NIxGoSsN1023ZYW2E140985000001CLSpKfgkCJSL' 61 'Ksc600001JKenjKnEDJuNX9GoVjCEbqIuKh6kFRvbzYnUxgQtONszJldyAar' 121 '3LtTSwsmBLpdlPc5iDH4Zf71'; FORM__F0546U='cocsi01'; FORM__F06' 181 '26U='rfv697481'; FORM__KEN='Log on' ' 241 ' ' I am invoking QzhbCgiParse as follows: C eval zhbCmd = '-POST -F 00037 -N 01208 ' +x'00' C callb (e) 'QzhbCgiParse' C parm zhbCmd C parm zhbFormat C parm zhbBuffer C parm zhbBufLen C parm zhbRspLen C parm QUSEC *** SUMMARY I can use the -p flag to change the prefix...but I cannot remove the prefix altogether. I cannot, yet, affect the seperator or remove the enclosing apostrophes. Any advice? Thanks, Simon Cockayne
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.