Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
line 52: Name or string > 250 characters

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Ashishpanpaliya

New User


Joined: 13 Oct 2017
Posts: 8
Location: India

PostPosted: Sat Oct 14, 2017 2:29 am    Post subject: line 52: Name or string > 250 characters
Reply with quote

Hi , I have written below rexx program to search string in PDS members.
Code:

/*   REXX   */
SAY 'HELLO WORLD!'
ARG PDSNAME STR2FIND
IF PDSNAME = "" THEN
  DO
     SAY 'WRONG PDS NAME'
     SAY "------------------------------------"
     SAY 'ENTER NAME OF PDS TO SEARCH:'
     PULL PDSNAME
  END
IF STR2FIND = "" THEN
  DO
     SAY 'WRONG STRING NAME'
     SAY "------------------------------------"
     SAY 'ENTER THE STRING TO FIND:'
     PULL STR2FIND
  END
CALL OUTTRAP "MBRS."
"LISTD" PDSNAME "MEMBERS"
CALL OUTTRAP "OFF"
DO NDX=1 TO MBRS.0
IF MBRS.NDX = "--MEMBERS--" THEN LEAVE
NDX=NDX+1
"ALLOC FI(XXOUT) DA('JPLAXCO.PRINT') MOD REUSE"
IF RC \= 0 THEN
   DO
      SAY '*** ERROR - LOG ALLOCATION FAILED: ABENDING'
      EXIT 0
   END
CALL LISTDSI PDSNAME
FULLNAME=SYSDSNAME
LOT.1="------------------------------------------------"
LOT.2="---  SEARCHING " PDSNAME " FOR STRING <" STR2FND ">"
LOT.3="------------------------------------------------"
LOT.0=3
"EXECIO" LOT.0 "DISKW XXOUT (STEM LOT."
DO CURMBR = NDX TO MBRS.0
        PARSE VALUE MBRS.CURMBR WITH MEMNAME
        MEMNAME=STRIP(MEMNAME)
        HDR=1
        SAY "MEMBER="FULLNAME"("MEMNAME")"
        "ALLOC F(XXIN) DS('"FULLNAME"("MEMNAME")') SHR REUSE"
        "EXECIO * DISKR XXIN (FINIS STEM IN."
        "FREE F(XXIN)"
         FND=0
         DO RECID=1 TO IN.0
           IF POS(STR2FND,IN.RECID) > 0 THEN
             DO
               IF HDR = 1 THEN
                  DO
                    LOT.1="--------------------------------------"#                    LOT.2="--> " MEMNAME " HAS THE STRING <" STR2FND "
                    LOT.3 = IN.RECID
                    LOT.0=3
                    "EXECIO" LOT.0 "DISKW XXOUT (STEM LOT."
                    HDR=0
                  END
               LOT.1 = IN.RECID
               LOT.0=1
               "EXECIO" LOT.0 "DISKW XXOUT (STEM LOT."
             END
         END
 END
 SAY '*** SEARCH COMPLETE ***'
 LOT.1="------------------------------------------------"
 LOT.2="-------------- END OF SEARCH  ------------------"
 LOT.3="------------------------------------------------"
 LOT.0=3
"EXECIO" LOT.0 "DISKW XXOUT (STEM LOT."
"EXECIO 0 DISKW XXOUT (FINIS"
"FREE F(XXOUT)"
EXIT 0

*****************getting an below error********************
Code:

52 +++  LOT.2="--> " MEMNAME " HAS THE STRING <" STR2FND "
      LOT.3 = IN.RECID                                                        LO
 T.0=3                                                                 "EXECIO"
 LOT.0 "DISKW XXOUT (STEM LOT."                                 HDR=0
                                                       END
                                             LOT.1 = IN.RECID
                                      LOT.0=1
     18 +++ CALL OUTTRAP "MBRS."
 IRX0030I Error running FINDSTR, line 52: Name or string > 250 characters
 ***


Coded
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1783
Location: Bloomington, IL

PostPosted: Sat Oct 14, 2017 2:37 am    Post subject:
Reply with quote

You have unbalanced quotes in the indicated line.
Back to top
View user's profile Send private message
Ashishpanpaliya

New User


Joined: 13 Oct 2017
Posts: 8
Location: India

PostPosted: Sun Oct 15, 2017 3:06 pm    Post subject:
Reply with quote

Its working now
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1827
Location: NY,USA

PostPosted: Mon Oct 16, 2017 10:44 am    Post subject:
Reply with quote

How is it different from SRCHFOR ?
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 233
Location: Maryland

PostPosted: Wed Oct 18, 2017 2:44 am    Post subject:
Reply with quote

Rohit Umarjikar wrote:
How is it different from SRCHFOR ?

1. Less functionality
2. Inconvenient interface
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1072
Location: Oostende, Belgium

PostPosted: Wed Oct 18, 2017 2:58 am    Post subject:
Reply with quote

3. Running at about a fraction of the speed of SuperC
4. Using about a zillion times more CPU
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Binary to display characters Roy Ware SYNCSORT 3 Tue Sep 19, 2017 8:46 pm
No new posts Search for a string in many PDS KARTHIGADEVI CLIST & REXX 5 Fri Sep 08, 2017 2:32 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts String after '.' (period) is not copy... balaji81_k SYNCSORT 6 Wed Aug 23, 2017 9:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us