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



Because programming is lot of copying too Paul!

(I won't use speed of execution as to defend myself :))

Kind regards,
Geert

-----Original Message-----
From: Nicolay, Paul [mailto:paul_nicolay@merck.com]
Sent: dinsdag 5 maart 2002 13:27
To: 'rpg400-l@midrange.com'
Subject: RE: API prototypes in /COPY member


Geert,

Why

C                         Movel(P)      Field1    Field2

C                   Z-Add     272           Er_BytesPr


and not

C                       Eval    Field2 = Field1

C                       Eval      Er_BytesPr = %Size(Error)

Kind regards,
Paul



-----Original Message-----
From: Geert Van Landeghem [mailto:gvl@reynderseti.be]
Sent: 05 March, 2002 13:20
To: 'rpg400-l@midrange.com'
Subject: RE: API prototypes in /COPY member


Peter,

When using the Error ds when calling a system api (f.e qusrobjd)
you first have to specify the length of your ds in field Er_BytesPr
as in the following example:

*************************************************
** Error Datastructure
*************************************************
D Error           DS
D Er_BytesPr              1      4B 0
D Er_BytesAv              5      8B 0
D Er_MsgID                9     15
D Er_Reserv              16     16
D Er_MsgDta              17    272
*************************************************

C* Object exists in Production?
C                   Movel(p)  Obj_Nam       ObjNameSel
C                   Movel(p)  Obj_Typ       ObjTyp
C                   Movel(p)  ProdLib       ObjLibSel

C* Length of error data structure
C                   Z-Add     272           Er_BytesPr

C                   Call      'QUSROBJD'
C                   Parm                    Rcv_Obj
C                   Parm                    Rcv_Len
C                   Parm      'OBJD0200'    Rcv_Fmt
C                   Parm                    ObjSel
C                   Parm                    ObjTyp
C                   Parm                    Error

C* Verifying Bytes Available
C                   Select
C* Object not found
C                   When      Er_BytesAv > 0 and
C                             (Er_MsgID = 'CPF9801' or Er_MsgID='CPF9811')
C                   Movel(p)  #NO           P_Pexist
C                   Movel(p)  #YES          P_Check
C                   When      Er_BytesAv > 0
C                   Movel(p)  '?'           P_Pexist
C                   Other
C                   Movel(p)  #YES          P_Pexist
C                   Endsl

(source makes part of a simple change management tool I'm
 writing at the moment)

Kind regards
Geert Van Landeghem
-----Original Message-----
From: Peter Colpaert [mailto:Peter.Colpaert@honda-eu.com]
Sent: dinsdag 5 maart 2002 13:08
To: rpg400-l@midrange.com
Subject: RE: API prototypes in /COPY member



This is what confuses me: it looks as if there are different lengths
possible, because I assume that both data structures are valid.

Is there an explanation for this?

Peter Colpaert
Application Developer

Honda Europe NV
Langerbruggestraat 104
B-9000 GENT
Peter.Colpaert@honda-eu.com
Tel: +32 9 2501 334
Fax: +32 9 2501 231
----------
"Captain, I cannot believe my ears!" - Spock
----------


Please respond to rpg400-l@midrange.com

Sent by:  rpg400-l-admin@midrange.com



To:   "'rpg400-l@midrange.com'" <rpg400-l@midrange.com>
cc:

Subject:  RE: API prototypes in /COPY member


Peter,

For the error code description have look at page 2-8 in System Api
Concepts:
http://publib.boulder.ibm.com/html/as400/v5r1/ic2924/books/c4158000.pdf

I'm always using this data structure in a /COPY member:

*************************************************
** Error Datastructure
*************************************************
D Error           DS
D Er_BytesPr              1      4B 0
D Er_BytesAv              5      8B 0
D Er_MsgID                9     15
D Er_Reserv              16     16
D Er_MsgDta              17    272
*************************************************

<<< snip>>>

kind regards,
Geert Van Landeghem






"Gwiazdowski Wojciech" <gwiazdowski@mmi.pl>@midrange.com on 05/03/2002
12:27:09

Please respond to rpg400-l@midrange.com

Sent by:  rpg400-l-admin@midrange.com


To:   <rpg400-l@midrange.com>
cc:

Subject:  RE: API prototypes in /COPY member


 * ----- Error code data structure
D ErrCod          DS                  INZ
D  BytPro                 1      4B 0 INZ(0)
D  BytAva                 5      8B 0
D  MsgID                  9     15
D  Rsrv1                 16     16
D  MsgDta                17    256

Wojciech Gwiazdowski




_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
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 ...


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.