I wish OP would take a step back and consider why this process must be a 
CLIST. As a newbie many years ago, I spent inordinate hours mastering 
CLIST. I became adept at the double/quadruple ampersand and other kludges 
necessary to make acrobatic string manipulations work as desired. After 
Rexx appeared in TSO/E in the 80's, I vowed never to write a new CLIST 
again. That first Rexx incarnation in TSO/E was replete with deficiencies 
even from a VM/CMS perspective. I stuck with it and coded with one hand on 
the keyboard and the other on the Rexx manual. 

The question is not whether it's possible to do anything in CLIST. The 
question is why bother? Unless you're making a minor modification to an 
existing, complex CLIST, I suggest (re)writing it in Rexx. That's what 
lies over the next hill. 

.
.
J.O.Skip Robinson
Southern California Edison Company
Electric Dragon Team Paddler 
SHARE MVS Program Co-Manager
626-302-7535 Office
323-715-0595 Mobile
jo.skip.robin...@sce.com



From:   CM Poncelet <ponce...@bcs.org.uk>
To:     IBM-MAIN@LISTSERV.UA.EDU, 
Date:   03/27/2014 06:50 PM
Subject:        Re: Clist character string compare
Sent by:        IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU>



Have you tried coding:
SET JOBCARD = &STR(&SUBSTR(2:10,&NRSTR(&INPUT)))?

BTW Are you also sure that '//JOBCARD' starts in column 2 (i.e. at offset 
1)? Otherwise change your code to something like:
A1: GETFILE INPUT
SET B    = &SYSINDEX(&STR(//JOBCARD),&NRSTR(&INPUT),1)
IF &B > 0 THEN DO
  SET JOBCARD = &STR(&SUBSTR(&B:&B+8,&NRSTR(&INPUT)))
  If JOBCARD = &STR(//JOBCARD) +
    Then write got it
  END /* IF */
ELSE +
  GOTO A1
<...>

Cheers, CP



Micheal Butz wrote:

>Hi
>
>I cann't seem to get equal looking for a character string in the input 
file
>
>I know that the job card is somewhere in the middle of the file
>
>So here is the code
>
>A1: GETFILE INPUT
>SET JOBCARD = &STR(&SUBSTR(2:10)
>If JOBCARD = &STR(//JOBCARD)
>Then write got it
>GOTO A1
>I do writes and see the character string however I never get an equal 
condition on the if statement

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to