Hola,

Para un CL te adjunto en fuente.

Saludos.




2007/9/7, Pedro Pinedo <[EMAIL PROTECTED]>:
>
>
> C                                   Z-ADD     1             N
>     2 0
> C                                  SETOFF
>           91
> C           'CALLB'       SCAN      OPER          N
>  91
> C  n91  'callb'          SCAN      OPER          N
>  91
> C           *IN91            IFEQ      '1'
>
>
> Pedro Pinedo Hernandez:  Analista-Programador
> Grupo Amcor Flexibles Hispania S.L.
> Departamento de Informática / IT Department
> tfno.:+34 941 28 60 90 - 941 03 01 39
> fax: +34 941 20 75 43
> Avd. Burgos 67-95
> 26006 Logroño Spain
> [EMAIL PROTECTED]
> (quitar nospam del dominio, para enviar)
>  _______________________________________________ AMCOR FLEXIBLES - LEADING
> THROUGH INNOVATION _______________________________________________ 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 FLEXIBLES
> immediately. Any views expressed in this message are those of the individual
> sender and may not necessarily reflect the views of AMCOR FLEXIBLES.
> __________________________________________________
> Forum.HELP400 es un servicio m&amp;#225;s de NEWS/400.
> &amp;#169; Publicaciones Help400, S.L. - Todos los derechos reservados
> http://www.help400.es
> _____________________________________________________
>
> Para darte de baja visita la siguente URL:
> http://listas.combios.es/mailman/listinfo/forum.help400
>



-- 
Martí Riera
/*----------------------------------------------------------------MRB*/
/* Esta rutina busca en &string la serie de caracteres &char,        +
/*   empezando en la posicion 9 y moviendo la ventana de longitud 6. +
/*   Devuelve '1' en &fnd si la encuentra, o '0' sino,               +
/*   devuelve en &npos la posicion.                                  */
/*-------------------------------------------------------------------*/
pgm (&string &char &fnd &npos)
dcl &string *char 999
dcl &char *char 6
dcl &fnd *char 1
dcl &pos *dec (3 0) 0
dcl &len *dec (6 0) 6
dcl &npos *char 3

chgvar &fnd 0
chgvar &pos 9

find:
chgvar &pos (&pos + &len)
if (&pos < 999) do
  if (%sst(&string &pos &len) *ne &char) then(goto find)
  else (chgvar &fnd '1')
enddo

end:
if (&fnd = '1') do
  chgvar &npos &pos
  sndpgmmsg msg('Caracter' *bcat &char *bcat 'en posición:' *bcat &npos)
enddo
return
endpgm
__________________________________________________
Forum.HELP400 es un servicio m&amp;#225;s de NEWS/400.
&amp;#169; Publicaciones Help400, S.L. - Todos los derechos reservados
http://www.help400.es
_____________________________________________________

Para darte de baja visita la siguente URL:
http://listas.combios.es/mailman/listinfo/forum.help400

Responder a