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
 
Reading a dataset from REXX program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Reading a dataset from REXX program
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: 8593
Location: Back in jolly old England

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

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

Global Moderator


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

PostPosted: Mon Apr 13, 2009 4:00 pm    Post subject:
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    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Mon Apr 13, 2009 4:15 pm    Post subject:
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

Senior Member


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

PostPosted: Mon Apr 13, 2009 9:20 pm    Post subject: Reply to: Reading a dataset from REXX program
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    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Tue Apr 14, 2009 9:33 pm    Post subject: Reply to: Reading a dataset from REXX program
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    Post subject:
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    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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm

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