Processing Array in Rexx



IBM's Command List programming language & Restructured Extended Executor

Processing Array in Rexx

Postby madrista » Tue Nov 29, 2016 11:27 am

HI ,
I am beginner in rexx, i need to search a string in data set. for that i have referred the data set using array. but i am unable to search string in the array .
please help me
Thanks in Advance ..
madrista
 
Posts: 2
Joined: Tue Nov 29, 2016 11:18 am
Has thanked: 2 times
Been thanked: 0 time

Re: Processing Array in Rexx

 

Re: Processing Array in Rexx

Postby BillyBoyo » Tue Nov 29, 2016 12:43 pm

There are several ways. Surely you've read about some of them in the documentation? Or you've searched here? Or done a bit of search-engineing?

By "array" do you mean a stem variable? What do you mean by "string" in this context? When you say you've "referred the data set using array" you mean you've written one line of code, or more?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Processing Array in Rexx

Postby madrista » Tue Nov 29, 2016 2:45 pm

Yes i have red the documents but i am unable to get what i want,
yes array mean stem variable im asking about, string is a word in the data set i would like to search.
my code is
"ALLOC F(INFILE) DSN(SAMPLE.REXX.PS) SHR REU"
"EXECIO * DISKR INFILE (FINIS STEM MYFILE.)"
"FREE F(INFILE)"

SO next i would like to search a word from the data set.
please guide me in this regard.
Thank you
madrista
 
Posts: 2
Joined: Tue Nov 29, 2016 11:18 am
Has thanked: 2 times
Been thanked: 0 time

Re: Processing Array in Rexx

Postby NicC » Tue Nov 29, 2016 7:49 pm

Read about the builtin functions especially those beginning WORD but also INDEX and POS.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic

These users thanked the author NicC for the post:
madrista (Wed Nov 30, 2016 11:00 am)
NicC
Global moderator
 
Posts: 2715
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 107 times

Re: Processing Array in Rexx

Postby Pedro » Tue Nov 29, 2016 10:35 pm

I think what you want is to execute the srchfor utility. Normally, this is ISPF option 3.14. You can submit a job similar to this:
//MYPDS  EXEC PGM=ISRSUPC,PARM=(SRCHCMP,'ANYC')
//NEWDD   DD   DISP=SHR,DSN=PEDRO.MY.PDS
//OUTDD   DD   SYSOUT=(H)                        
//SYSIN   DD *                                  
SRCHFOR  'XYZ'                                  
/*                                              

You can also use rexx to allocate the required DD names and invoke the ISRSUPC program.
Pedro Vera

These users thanked the author Pedro for the post:
madrista (Thu Dec 15, 2016 12:26 pm)
User avatar
Pedro
 
Posts: 571
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 40 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post