× 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.



Why does the PR use LIKE and the PI use LIKEDS?

Rob Berendt
-- 
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Malchow, Grizzly" <GMalchow@xxxxxxxxxxxxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
04/29/2005 09:23 AM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
<rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE PSDS as parm






Here's what I have in a prototype definition named ERRORPR

D SndErrMsg       PR            10I 0
D ErrDS                               Like(MYPSDS)

****************************************************************
* Program Status Data Structure
****************************************************************
D MYPSDS         SDS
D  Prog_Name        *PROC
Procedure Name
D  PGM_Status       *STATUS
Status Code
D  Prv_Status            16     20S 0
Previous Status
D  Line_Num              21     28
Src List Line Num
D  Routine          *Routine
Routine Name
D  Parms            *Parms
Num Passed Parms
D  Excp_Type             40     42
Exception Type
D  Excp_Num              43     46
Exception Number

D  PGM_LIB               81     90
Program Library
D  Excp_Data             91    170
Exception Date
D  Excp_ID              171    174
Exception ID
D  Date                 191    198
Date
D  Year                 199    200S 0
Year
D  Last_File            201    208
Last File Used
D  File_Info            209    243
File error info
D  Job_Name             244    253
Job Name
D  User                 254    263
User Name
D  Job_Num              264    269S 0
Job Number
D  Job_Date             270    275S 0
Job Date
D  Run_Date             276    281S 0
Run Date
D  Crt_Date             288    293
Create Date
D  Crt_Time             294    299
Create Time
D  Cpl_Level            300    303
Compiler Level
D  Src_File             304    313
Source File
D  Src_Lib              314    323
Source Library
D  Src_Mbr              324    333
Source Member
D  Proc_Pgm             334    343
Pgm Proc is in
D  Proc_Mod             344    353
Mod Proc is in

Here's a separate module where I have my procedures

 /Copy SRCPRD/QMODSRC,ERRORPR
************************************************************************
****
*Send Exception Error Message
************************************************************************
****
P SndErrMsg       B                   Export

D SndErrMsg       PI            10I 0
D  ErrDS                              LikeDS(MYPSDS)

 /Free
   // Logic to send the exception error
 /End-Free
P SndErrMsg       E 

When I try to compile the module I get the following error:
The definition of the parameter does not match the definition specified
on the prototype.
I don't understand why I get this error. I'm at V5R1. Is it possible
that data structures can't be defined as a procedure interface at V5R1?
If I change ErrDS to be 353 alpha I don't receive the error. I'm trying
to come up with a program that can be called to handle exception errors.
Right now I just want to send exception errors to a specified MSGQ,
MSGF, or User (I haven't decided which one yet). 

-- 
This is the RPG programming on the AS400 / 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.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.