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

Hello,

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:

Code:

         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 TSO "ISPEXEC VIEW DATASET("TESTOUT") MACRO(CLEANMC2)" 
         ADDRESS ISPEXEC 'VGET (STRFND) PROFILE'                       
         STRFND = STRIP(STRFND)


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

***** Dialog Error ***** - Application(ISP); Function Command (CLEANUP1); Service(VIEW)
Line from cmd: - VIEW DATASET(TEST.OUT.LIST) MACRO(CLEANMC2)
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.

Thanks.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
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:
Code:
x = SYSDSN("proj.exec(mem1)")
Select
  When x = ’OK’ Then Call proc1 /* member found */
  When x = 'MEMBER NOT FOUND'  Then Call proc2
  Otherwise call proc3 /*some problem */
End
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 Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
Search our Forums:

Back to Top