Yo la utilizo en un programa estoy en V5R1 y la unica diferencia que encontre fue en
los "overlay" que utilizas en la estructura de datos ERROR, el codigo en mi programa
esta asi:
D GetProfileHdl PR ExtPgm( 'QSYGETPH' )
D pUserID 10
D pPassword 10
D pHdl 12
D pAPIError 272
****************************************************************
D APIError DS
D BytesProvided 10I 0 Inz( 272 )
D BytesAvail 10I 0 Inz( 0 )
D MsgID 7 Inz( *Blanks )
D Reserved 1 Inz( *Blanks )
D MsgDta 256 Inz( *Blanks )
****************************************************************
C Reset APIError
C*
C CallP GetProfileHdl( qusr01 :
C pxpass :
C Hdl :
C APIError )
*si el error es "User profile not found".
C If msgid='CPF2204'
C callp wrtsection('usernovalid')
C*
C Reset APIError
...
...
...
Espero que esto te sirva, saludos
Gerardo Santillana
IT Department
Delphi Mechatronic Systems
US Ph: (956) 554.5832
MX Ph: (88) 12.81.63/64/65 Ext. 5832
e-mail [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Dario Heinze
Sent: Monday, January 05, 2004 12:11 PM
To: Forum400
Subject: API QSYGETPH
Muy buen feliz a�o, para todos los participantes.
Agradecere cualquier aporte al problema que estoy teniendo con esta API,
tengo el siguiente codigo.
d getProfile pr ExtPgm('QSYGETPH')
d 10a const
d 10a const
d 12a
d 32766a options(*varsize: *nopass)
d Error ds
d BytesUsados 10i 0 overlay(Error: 01) inz(*zeros)
d BytesDispon 10i 0 overlay(Error: 05) inz(*zeros)
d id_Excepcion 7a overlay(Error: 09)
d txt_Excepcion 512a overlay(Error: 17)
c CallP(e) getProfile(User:
c PassWord:
c hProfile:
c Error)
c If %error
c Return
c EndIf
c If BytesUsados > 0
c Select
c*Contrase�a incorrecta.
c When id_Excepcion = 'CPF22E2'
c* Solicito contrase�a nuevamente/cancelo.
c* Usuario deshabilitado.
c When id_Excepcion = 'CPF22E3' or
c id_Excepcion = 'CPF1124'
c* Solicito otro usuario/cancelo
c EndSl
mi problema es que si le saco el control de error con (e) cancela por alguno
de los CPF's que quiero controlar, si lo dejo al control el programa cancela
pero no me devuelve la informacion de error en la estructura.
no se que puedo estar haciendo mal, revise la deficion de la API, y
aparentemente esta correcta.
Como dato estoy en V4R4,
Si alquien tiene una idea o ve donde estoy metiendo la pata...
Saludos,
Dario.-
_____________________________________________________
Forum.HELP400 es un servicio m�s de NEWS/400.
� Publicaciones Help400, S.L. - Todos los derechos reservados
http://www.help400.es
_____________________________________________________
Para darte de baja, env�a el mensaje resultante de pulsar
mailto:[EMAIL PROTECTED]
****************************************************************************************
Note: The information contained in this message may be privileged and confidential and
thus protected from disclosure. If the reader of this message is not the intended
recipient, or an employee or agent responsible for delivering this message to the
intended recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to the message and
deleting it from your computer. Thank you.
****************************************************************************************
_____________________________________________________
Forum.HELP400 es un servicio m�s de NEWS/400.
� Publicaciones Help400, S.L. - Todos los derechos reservados
http://www.help400.es
_____________________________________________________
Para darte de baja, env�a el mensaje resultante de pulsar
mailto:[EMAIL PROTECTED]