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

Issues with VIEW DATASET Command

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

New User

Joined: 25 Jun 2020
Posts: 6
Location: UK

PostPosted: Fri May 26, 2023 4:06 pm
Reply with quote


I'm working on a REXX utility that will read a file with list of tables and search for them in production libraries. If they are not present then they will be written in the output file, which will then be used for other processing.

The utility I have coded is working properly, this is the basic logic -
1. Read the input file sequentially ( i.e. list of tables)
2. Using the ISRSUPC - SRCHFOR in library1. Open the output of 'ISRSUPC' and confirm if the table was found. If not the table was not found, then use the ISRUPC to search in library 2.
3. If the table was not found in both the libraries then it is written in the output file.

However, the problem I'm facing is ISPEXEC VIEW DATASET statement. Once the processing of the MACRO is complete - it opens the dataset for the user to view and then the user has to press F3 for it to continue. I want the process to run in the background.

Below is the snippet of code - ISRSUPC execution and then checking the output for SRCHFOR to check if the table was found:


         ADDRESS ISPEXEC                                               
         ADDRESS TSO                                                   
          "ALLOC DD(NEWDD)   SHR REU DA("PRODPDS")"                     
          "ALLOC DD(OUTDD)   SHR REU DA("TESTOUT") SP(50,50) TR MOD     
           REU RELEASE LRECL(080) BLKSIZE(27920) RECFM(F,B,A)"         
          "ALLOC DD(SYSIN)   SHR REU DA("TABLE1","MEMBERS")"           
         SUPARM = "SRCHCMP,ANYC"                                       
         ADDRESS ISPEXEC                                               
            'SELECT PGM(ISRSUPC) PARM('SUPARM')'                       
         ADDRESS ISPEXEC                                               
         ADDRESS TSO                                                   
          "FREE FI(NEWDD)"                                             
          "FREE FI(OUTDD)"                                             
          "FREE FI(SYSIN)"                                             
         /* CHECKING THE RESULT OF SRCHFOR                         */ 
         ADDRESS ISPEXEC 'VGET (STRFND) PROFILE'                       

Also, I tried running this in batch mode as well, and got the below error

***** Dialog Error ***** - Application(ISP); Function Command (CLEANUP1); Service(VIEW)
Panel 'ISREDDE3' error - Panel not found.

I have used this view statement multiple times with MACRO, but I have not faced this issue before.
Let me know if you all have any inputs for me.
Back to top
View user's profile Send private message
Jag Badal

New User

Joined: 25 Jun 2020
Posts: 6
Location: UK

PostPosted: Fri May 26, 2023 6:10 pm
Reply with quote

I figured out the issue, posting the solution here incase someone else encounters this issue :

I had forgotten to code the "CANCEL" command in my macro. Added that and it resolved the issue.

Back to top
View user's profile Send private message

Global Moderator

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

PostPosted: Sat May 27, 2023 12:45 am
Reply with quote

Good that you got it to work.

But this might simplify your exec:

Use the SYSDSN( ) built-in function to determine if the member exists:
x = SYSDSN("proj.exec(mem1)")
  When x = ’OK’ Then Call proc1 /* member found */
  When x = 'MEMBER NOT FOUND'  Then Call proc2
  Otherwise call proc3 /*some problem */
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 CVDA value for RRDS VSAM dataset. CICS 2
No new posts Started task using a generation dataset JCL & VSAM 7
No new posts access the last host command CLIST & REXX 2
No new posts Build dataset list with properties us... PL/I & Assembler 4
No new posts Newbie Stuck on "Duplicate Datas... TSO/ISPF 5
Search our Forums:

Back to Top