¿has hecho un debug del cl, para ver que datos tiene la variable?

Yo he tenido porblemas con variables *char de mas de 30 en procedimientos 
sometidos, y ya por costumbre, paso esas variables en dos:
parm (&PITEM1 &PITEM2)
DCL        VAR(&PITEM) TYPE(*CHAR) LEN(35) 
DCL        VAR(&PITEM1) TYPE(*CHAR) LEN(30) 
DCL        VAR(&PITEM2) TYPE(*CHAR) LEN(5) 
chgvar        VAR(&PITEM) value(&PITEM1 *cat &PITEM2)
 
Pedro Pinedo Hernandez
TIPO Programmer/Analyst & AS400
Analista-Programador
Departamento de Informática / IT Department
tfno.:+34 941 28 60 90 - 941 03 01 39
fax: +34 941 03 01 39
Amcor Flexibles
T +34 941 286 090   F +34 941 207 543
www.amcor.com 


 

P Antes de imprimir, piensa en el MEDIO AMBIENTE P 

 



From:
[email protected]
To:
<[email protected]>
Date:
12/04/2010 17:29
Subject:
RE: Ayuda con CPYF



 
Le intente con las comillas pero hace lo mismo,  me copia todos los 
articulos que contengan la palabra 'TJ600 ',    solo cuando lo corro 
interactivo funciona bien
 
Gracias
 
From: [email protected]
To: [email protected]
Subject: Re: Ayuda con CPYF
Date: Wed, 7 Apr 2010 17:25:35 -0500

Debes concatenar entre comilla el valor, se ve que es alfa..
----- Original Message ----- 
From: Gerardo Santillana 
To: [email protected] 
Sent: Wednesday, April 07, 2010 3:43 PM
Subject: Ayuda con CPYF

 
Tengo un CL que recibe un parametro (numero de articulo),  y uso el 
comando CPYF para copiar  solo ese articulo de un archivo a otro,  este es 
el comando que uso
 
DCL        VAR(&PITEM) TYPE(*CHAR) LEN(35) 
 
CPYF       FROMFILE(IIM) TOFILE(TV81MMUSRF/PKMIIM) + 
             MBROPT(*REPLACE) INCREL((*IF IPROD *EQ + 
             &PITEM)) 

 lo que esta pasando es que se intento copiar el articulo 'TJ600    ', 
resulta que el comando copio todos los registros que tuvieran el TJ600, 
(e.g.  TJ600-00, TJ600-13....ETC)
 
si lo ejecuto en modo interactivo funcion bien y solo me copia un solo 
registro que es lo que necesito
 
CPYF FROMFILE(IIM) 
     TOFILE(PKMIIM) 
     MBROPT(*REPLACE) 
     INCREL((*IF IPROD *EQ 'TJ600 '))
 
Alguna idea?
 
Saludos

The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with 
Hotmail. Get busy. 

____________________________________________________
© Publicaciones Help400, S.L.

The New Busy is not the too busy. Combine all your e-mail accounts with 
Hotmail. Get busy.____________________________________________________
© Publicaciones Help400, S.L.


______________________________________________________

Amcor - Creating a new world of packaging
______________________________________________________

CAUTION - This message may contain privileged and confidential information 
intended only for the use of the addressee named above. If you are not the 
intended recipient of this message you are hereby notified that any use, 
dissemination, distribution or reproduction of this message is prohibited. If 
you have received this message in error please notify Amcor immediately. Any 
views expressed in this message are those of the individual sender and may not 
necessarily reflect the views of Amcor .

<<image/gif>>

____________________________________________________
© Publicaciones Help400, S.L.

Responder a