IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Reading a dataset from REXX program


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Siddharth4v

New User


Joined: 20 Aug 2008
Posts: 7
Location: India

PostPosted: Mon Apr 13, 2009 2:50 pm
Reply with quote

Hi,
Could anyone help me with reading a dataset whose RECFM=U, from a REXX program. It says the EXECIO command can be used only on datasets with Fixed or Variable record format. It cannot be used on datasets with RECFM=U. Is there a solution for this?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Apr 13, 2009 3:13 pm
Reply with quote

Nope
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Apr 13, 2009 4:00 pm
Reply with quote

other than the REXX script CALLing a program (that supports U Recfm) to accomplish the reads and return the record to the script.

But then, why use REXX?
Back to top
View user's profile Send private message
Siddharth4v

New User


Joined: 20 Aug 2008
Posts: 7
Location: India

PostPosted: Mon Apr 13, 2009 4:09 pm
Reply with quote

My exact requirement is to check if the dataset has a given string or not. I tried using the ISREDIT command "FIND". If we use FIND on the editor, it works. But if used inside a REXX program and executed as a macro, it does not. What happens when i try to open the dataset in edit mode is, it automatically substitutes it with Browse mode. I think that is the reason why it is not executing the ISREDIT commands.

If the same can be done without using REXX, kindly tell me how I can proceed with that?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Apr 13, 2009 4:15 pm
Reply with quote

what is this file? SMF?, OBJECT? there are few types of datasets that are recfm=U.

you are correct, EDIT MACROs do not work in BROWSE mode.

but if you can browse the file, do a FIND from the command line.
you only mentioned on file, so why try to automate something for 1 file?

again, what is this dataset used for?

also, try using VIEW. Is this a large dataset?
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Mon Apr 13, 2009 9:20 pm
Reply with quote

Quote:
My exact requirement is to check if the dataset has a given string or not.

If you are searching for text, why not use the SRCHFOR utility of ISPF? I just tried it: it seems to handle load module datasets.
Back to top
View user's profile Send private message
Siddharth4v

New User


Joined: 20 Aug 2008
Posts: 7
Location: India

PostPosted: Tue Apr 14, 2009 11:47 am
Reply with quote

The different version of program will have different Level number. So, to find which version is in use, we need to open the program (load-module) and search for/find the level number inside the load-module.

Now we got a requirement to find the version of some 200 programs. We don’t want to do this manually. That’s why I tried to write a Rexx program.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Tue Apr 14, 2009 7:00 pm
Reply with quote

Siddharth,

Did you see Pedro's post? Generate batch JCL from 3.14 to search your library. Parse the output file to get the list of programs.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Apr 14, 2009 9:33 pm
Reply with quote

SRCHFOR will search for specific text and show you the line the has it. Perhaps search for the must current level and then 'fix' any members not at that level. But why do you need to know which are back level? Just replace all with the most current versions.

And if these 200 programs are related, I further suggest that you re-compile all 200 programs to make sure they all use the same level of control blocks.
Back to top
View user's profile Send private message
Siddharth4v

New User


Joined: 20 Aug 2008
Posts: 7
Location: India

PostPosted: Wed Apr 15, 2009 9:40 am
Reply with quote

Thank you for your suggestions. I'll try out what you've suggested.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Using API Gateway from CICS program CICS 0
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top