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 ..
Processing Array in Rexx
-
madrista
- Posts: 2
- Joined: Tue Nov 29, 2016 11:18 am
- Skillset: JCL COBOL DB2 REXX
- Referer: INTERNET
-
BillyBoyo
- Global moderator
- Posts: 3805
- Joined: Tue Jan 25, 2011 12:02 am
- Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
- Referer: Google
Re: Processing Array in Rexx
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?
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?
-
madrista
- Posts: 2
- Joined: Tue Nov 29, 2016 11:18 am
- Skillset: JCL COBOL DB2 REXX
- Referer: INTERNET
Re: Processing Array in Rexx
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
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
-
NicC
- Global moderator
- Posts: 3025
- Joined: Sun Jul 04, 2010 12:13 am
- Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
- Referer: Google
- Location: Pushing up the daisies (almost)
Re: Processing Array in Rexx
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
Regards
Nic
- Pedro
- Posts: 687
- Joined: Thu Jul 31, 2008 9:59 pm
- Skillset: ISPF
- Referer: google
- Location: Silicon Valley
Re: Processing Array in Rexx
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:
You can also use rexx to allocate the required DD names and invoke the ISRSUPC program.
Code: Select all
//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
-
- Similar Topics
- Replies
- Views
- Last post
-
- 10
- 9567
-
by chillmo
View the latest post
Thu Mar 13, 2025 12:01 am
-
-
Error invoking java method (array) IGZ0045S
by JgbCobol » Mon Nov 07, 2022 3:54 pm » in Mainframe Java - 2
- 6844
-
by JgbCobol
View the latest post
Tue Nov 08, 2022 12:32 pm
-
-
- 12
- 7208
-
by sergeyken
View the latest post
Mon Sep 25, 2023 3:33 am
-
- 3
- 4239
-
by Robledo
View the latest post
Thu Mar 10, 2022 1:03 pm
-
- 2
- 3221
-
by sergeyken
View the latest post
Fri Jul 14, 2023 7:13 pm