@Fuerchau: Danke für den Tip!
So tuts:
Code:
*** externe Prozeduren ***
D qcapcmd pr extpgm('QCAPCMD') Befehl prüfen
D 200 Command
D 10i 0 const Len
D 20 const Options
D 10i 0 const Len
D 8 const Options format
D 200 Changed Command
D 10i 0 const Len avail
D 10i 0 const Len returned
D 515 API-Error
*** Datenstrukturen ***
D cpop0100 ds qualified CPOP0100-Format
D cmdType 10i 0 inz(4) Comand type
D dbcsHandling 1 inz('0') DBCS data handling
D promptAction 1 inz('1') Prompt action
D cmdSyntax 1 inz('0') Comand syntax
D msgRtvKey 4 inz(*allx'00') Messange rtv. Key
D ccsid 10i 0 inz(0) CCSID of Command
D res1 5 inz(*allx'00') Reserviert
D apiError ds qualified API-Error
D bytesProv 10i 0 inz(%len(apiError)) Länge erw.
D bytesAvail 10i 0 Länge verf.
D msgId 7 MsgId
D res1 1 reserved
D msgData 500 MsgData
*** Felder ***
D p_cmd s 200
D p_cmdLen s 10i 0
/free
// Anfangswerte setzen
// ===================
p_cmd = 'CPYF FROMFILE(&TSYSSLIB/&FILE) ' +
'TOFILE(&TSYSTLIB/&FILE) FROMMBR(*ALL) TOMBR(*FROMMBR) ' +
'FROMRCD(1) COMPRESS(*YES)';
// Befehl prüfen
// =============
callp(e) qcapcmd(p_cmd: %len(p_cmd): cpop0100: %len(cpop0100):
'CPOP0100': p_cmd: %len(p_cmd): p_cmdLen: apiError);
if apiError.bytesAvail > 0;
...
Bookmarks