I have a REST web service running an RPG program, as I need to encrypt some data using Openssl I have built a shell script that receives the data via ENV vars and sends out the data in data areas.
Rest_RPG calls a CLP that runs the qsh script, and retrieves the data from the data area. If I run the cl interactively it works perfectly and it retrieves the data from the data area but when called from the REST web service it doesn't retrieve anything, I have gave authority to QTMHHTTP and QTMHHTP1 to QGPL and no luck, any ideas?
script: print -nr $PASS | openssl enc -aes-128-ecb -K $KEY_HEX -nosalt -base64 | datarea -wl $DTAPASS
CLP: CRTDTAARA DTAARA(QGPL/DTAPASS) TYPE(*CHAR) LEN(512) AUT(*ALL) ADDENVVAR ENVVAR(PASS) VALUE(&PPASS) CCSID(*JOB) REPLACE(*YES) qsh('/tmp/script.sh') RTVDTAARA DTAARAQGPL/DTAPASS) RTNVAR(&ENC_PASS)