× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: CPF2479 on sndpgmmsg
  • From: "Danny Rodius" <danny.rodius@xxxxxxxxx>
  • Date: Mon, 28 Aug 2017 11:42:33 +0200
  • Ironport-phdr: 9a23:ne/PTBXnOHUH/1AQxpwaXHeS3BDV8LGtZVwlr6E/grcLSJyIuqrYYxSGt8tkgFKBZ4jH8fUM07OQ6PGwHzRYqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjSwbLdxIRmssQndqtQdjJd/JKo21hbHuGZDdf5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2UbJXDDI9M2Ao/8LrrgXMTRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6tvZ41SKHM8D6Uaw4VDK/5KptVRTmijoINyQh/W/XlMJ+kaxVrhGuqBNjxIDUfJqYO+BicqPSZd4WW3ZNUthXWidcAo28dYwPD+8ZMOpWoYfyvV0OrR2+BAKxGO3vzSJHhn7r3a0h3egqDAbL0xE6ENIItnTVrM/5NL0VUe+ozanI0C7DYuhN2Tf+6InIdA4uoe2WUb1rb8Xc0E8iHB7GgFWIsYHpIjeY2+sXv2WZ7OdsT/+jhm4kpg1rrTWiwNonhJPTiYIP0F/E8D10wIMyJdKlVkF2ecWkEJ5MtyGCMIt2X98iT3louCkkzr0Gvoa2ciYQx5QhwR7ea+aJfpaQ7hLiUuaePyt4iWp4dL+7iBu+60qtx+7mWsWp0FtHrTBJn9bUunAIzRPT68yHSvVn/kem3DaCzx3c5ftCIUAylavXMYQhwrktmZoSrETDBTT7mF71jK6WcEUr5PSo5/78bbr4vpOcLZN7ihniMqQyncyyGf44MhABX2WU5eiwyKTv/UniTbVPj/05j7PZv4rcJcQUuKG1GRNa0oEm60X3MzDzhM4AkiVfdBdBUBeGg5LgPV7DZvv/CKHsrU6rlWIh6/nAOKypOJLBL2XY2v+1cb977V8a0g0/zM1Ez4lXG7cMPLT5Vxmi55TjEhYlPlnskK7cA9Jn29ZGVA==
  • List-archive: <http://archive.midrange.com/rpg400-l/>
  • List-help: <mailto:rpg400-l-request@midrange.com?subject=help>
  • List-id: "RPG programming on the IBM i \(AS/400 and iSeries\)" <rpg400-l.midrange.com>
  • List-post: <mailto:rpg400-l@midrange.com>
  • List-subscribe: <http://lists.midrange.com/mailman/listinfo/rpg400-l>, <mailto:rpg400-l-request@midrange.com?subject=subscribe>
  • List-unsubscribe: <http://lists.midrange.com/mailman/options/rpg400-l>, <mailto:rpg400-l-request@midrange.com?subject=unsubscribe>

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


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.