|
Hi all,
I'm lost. Writing some command validation program and i'm blocked in
sending
a diagnostic message and escape message.
Don't find why I'm getting this error.
Program was compiled with actgrp *caller. ( see comments)
Anyone an idea what I'm doing wrong here or forgot?
**free
// Compile options:
// - CrtRpgMod Module( STL1030VP )
// DbgView( *LIST )
//
// - CrtPgm Pgm( STL1030VP )
// Module( STL1030VP )
// ActGrp( *Caller )
ctl-opt debug(*yes);
ctl-opt option(*srcstmt : *nodebugio : *nounref);
dcl-ds ERRC0100;
AeBytesPrv int(10) inz(%size(ERRC0100));
AeBytesAvl int(10) inz(0);
AeException char(7);
Aereserved char(1);
AeExceptData char(240);
End-ds;
dcl-pr sndProgramMessage ExtPgm( 'QMHSNDPM' );
SpMsgId char(7) Const;
SpMsgFq char(20) Const;
SpMsgDta char(128) Const;
SpMsgDtaLen int(10) Const;
SpMsgTyp char(10) Const;
SpCalStkE varchar(10) Const;
SpCalStkCtr int(10) Const;
SpMsgKey char(4);
ErrorCode likeds(ERRC0100)
options(*VarSize);
SpCalStkEntLen int(10) Const Options( *NoPass );
SpCalStkEntQual char(20) Const Options( *NoPass );
SpDspWait int(10) Const Options( *NoPass );
SpCalStkEntTyp char(20) Const Options( *NoPass );
SpCcsId int(10) Const Options( *NoPass );
end-pr;
dcl-c F_OK const(0);
dcl-c R_OK const(4);
dcl-c W_OK const(2);
dcl-c X_OK const(1);
dcl-pr access int(10) ExtProc('access');
Path pointer value options(*string);
amode int(10) value;
end-pr;
dcl-pi *n;
PxIfsObjPath varchar(5000) const;
PxIfsObjSize packed(15:0);
end-pi;
dcl-s MsgDta varchar(512);
dcl-s MsgKey char(4);
If access( PxIfsObjPath: F_OK ) = -1;
MsgDta = '0000' + 'IFS object ' + PxIfsObjPath + ' not found.';
sndProgramMessage( 'CPD00006'
: 'QCPFMSG *LIBL'
: MsgDta
: %Len( MsgDta )
: '*DIAG'
: '*PGMBDY'
: 1
: MsgKey
: ERRC0100
);
MsgDta = '';
sndProgramMessage( 'CPF0002'
: 'QCPFMSG *LIBL'
: MsgDta
: %Len( MsgDta )
: '*ESC'
: '*PGMBDY'
: 1
: MsgKey
: ERRC0100
);
EndIf;
*InLr = *On;
return;
Best regards;
Danny
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
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.