i. GET method to a web API that returns a .gz file. We store it to an IFS directory.
ii. Here's the code running the QSHELL commands.
Code: Select all
dcl-PI *N;
path varchar(1000) const;
file varchar(1000) const;
response char(16000000);
End-Pi;
dcl-c q const('''');
dcl-s ifsDir int(10) Inz(*Zeros);
*=========================================================================
CallP(E) ExecuteCommand('RMVENVVAR ENVVAR(QIBM_QSH_CMD_OUTPUT)');
CallP(E) ExecuteCommand('ADDENVVAR ENVVAR(QIBM_QSH_CMD_OUTPUT) '
+ 'VALUE(NONE)');
CallP(E) ExecuteCommand('STRQSH CMD(' + q + 'cd ' + %Trim(path)
+ '; 7z e ' + %Trim(file) + '.gz' + q + ')');
Code: Select all
QSH Command Entry
$
> cd /home/as5289/zipper
$
> ls
600.gz
$
> 7z e 600.gz
/QOpenSys/usr/bin/7z: 001-0012 Error found starting child process.