Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Concatenate my dataset in ISPPLIB

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 268
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Tue Sep 23, 2014 7:34 pm    Post subject: Concatenate my dataset in ISPPLIB
Reply with quote

Hi,

I'm using below rexx to concatenate my dataset in the data sets currently allocated to ISPPLIB. It runs without any error, but my dataset is still not concatenated. It works fine with SYSPROC, but it's not working with ISPPLIB. Why is that. Is it because of some access related problem?

Code:
/**************************** REXX *********************************/   
/* THIS EXEC ADDS A DATA SET TO THE FRONT OF THE DATA SETS IN THE  */   
/* ISPPLIB CONCATENATION.                                          */   
/* IT FINDS ALL DATA SETS CURRENTLY ALLOCATED TO ISPPLIB, ADDS THE */   
/* NEW DATA SET TO THE BEGINNING AND RE-ALLOCATES THE CONCATENATION*/   
/* TO ISPPLIB.                                                     */   
/*******************************************************************/   
 ADDNAME = 'MY.ISPPLIB'                                           
                                                                       
 X = OUTTRAP('NAME.')/*BEGIN TRAPPING LINES OF OUTPUT FROM COMMANDS*/   
                 /* OUTPUT GOES TO VARIABLES BEGINNING WITH 'NAME.'*/   
                                                                       
 "LISTA ST"      /* LIST THE STATUS OF YOUR CURRENTLY ALLOCATIONS  */   
 FOUND = 'NO'    /* SET THE FOUND FLAG TO NO    */                     
 I = 1           /* SET THE INDEX VARIABLE TO 1 */                     
                                                                       
/*******************************************************************/   
/* LOOP THROUGH THE LINES OF TRAPPED COMMAND OUTPUT TO FIND LINES  */   
/* 9 CHARACTERS LONG OR LONGER. CHECK THOSE LINES FOR THE WORD     */   
/* ISPPLIB UNTIL IT IS FOUND OR UNTIL ALL LINES HAVE BEEN CHECKED. */   
/* IF ISPPLIB IS FOUND, THE INDEX IS DECREASED ONE AND THE NAME OF */   
/* THE FIRST DATA SET CONCATENATED TO ISPPLIB IS STORED IN VARIABLE*/   
/* "CONCAT".                                                       */   
/*******************************************************************/   
 DO WHILE (FOUND = 'NO') & (I <= NAME.0)                               
   IF LENGTH(NAME.I) >= 9 THEN                                         
     IF SUBSTR(NAME.I,3,7) = 'ISPPLIB' THEN                             
       DO                                                               
         FOUND = 'YES'                                                 
         I = I - 1                                                     
         CONCAT = "'"NAME.I"'"                                         
       END                                                             
     ELSE                                                               
       I = I + 1                                                       
   ELSE                                                                 
     I = I + 1                                                         
 END                                                                   
 /*******************************************************************/ 
 /* WHEN ISPPLIB IS FOUND, LOOP THROUGH DATA SETS UNTIL ANOTHER FILE*/ 
 /* NAME IS ENCOUNTERED OR UNTIL ALL LINES ARE PROCESSED.  APPEND   */ 
 /* DATA SET NAMES TO THE ONE IN VARIABLE "CONCAT".                 */ 
 /*******************************************************************/ 
  IF FOUND = 'YES' THEN                                                 
   DO WHILE (I + 3) <= NAME.0                                           
     I = I + 3                                                         
       IF SUBSTR(NAME.I,1,3) = '   ' THEN                               
         DO                                                             
           I = I - 1                                                   
           CONCAT = CONCAT",'"NAME.I"'"                                 
         END                                                           
       ELSE                                                             
         I = NAME.0                                                     
                                                                       
   END                                                                 
 ELSE NOP                                                               
                                                                       
/* ADD THE NEW DATASET TO THE CONCATENATION */                         
 CONCAT = "'"ADDNAME"',"CONCAT""                                       
                                                                       
/* ALLOCATE THE NEW CONCATENATION TO ISPPLIB */                         
 "ALLOC F(ISPPLIB) DA("CONCAT") SHR REUSE"                             


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

Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1219
Location: Israel

PostPosted: Tue Sep 23, 2014 8:13 pm    Post subject:
Reply with quote

Why don't you use LIBDEF ISPPLIB ?
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Tue Sep 23, 2014 9:11 pm    Post subject: Reply to: Concatenate my dataset in ISPPLIB
Reply with quote

You have to change the ISPF DD name allocations before starting ISPF. Otherwise, you get a 'file is open' situation and you cannot change the allocation.
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 268
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Wed Sep 24, 2014 7:24 pm    Post subject:
Reply with quote

Hi Pedro,

I tried adding "FREE FI(ISPPLIB)" before allocate statement, but it's giving RC=12.

Basically I want to test the panel from ISPF 7.2 (Display Panel) option, rather than running a rexx macro each time.
Code:
/*REXX*/                                             
"PROFILE NOPREFIX"                                   
"ISPEXEC LIBDEF ISPPLIB DATASET ID('MY.ISPPLIB')"
"ISPEXEC DISPLAY PANEL(TESTP1)"                       
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Wed Sep 24, 2014 8:09 pm    Post subject:
Reply with quote

"FREE FI(DDNAMEID)"

"ALLOC FI("DDNAMEID") DA('"DSNAMEID"',"CONCAT") SHR REUSE"
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Wed Sep 24, 2014 9:17 pm    Post subject: Reply to: Concatenate my dataset in ISPPLIB
Reply with quote

Repeating:
Quote:
You have to change the ISPF DD name allocations before starting ISPF. Otherwise, you get a 'file is open' situation and you cannot change the allocation.

Also, you cannot FREE a file that is open.

Maybe I was not clear. You have to get out of ISPF so that ISPPLIB is not open, then re-allocate the DD name that ISPF will later open. Then get back into ISPF.
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Wed Sep 24, 2014 9:51 pm    Post subject:
Reply with quote

This is done before I start the ISPF session. if they are doing this after ISPF is running then they should do the a LIBDEF. The REXX he modified and is trying to use this for was designed to be used before ISPF was started and has been around for many many years.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Wed Sep 24, 2014 10:56 pm    Post subject: Reply to: Concatenate my dataset in ISPPLIB
Reply with quote

The poster did not state where the exec was being executed, but I gleaned it from this:
Quote:
It works fine with SYSPROC, but it's not working with ISPPLIB
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 268
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Wed Sep 24, 2014 11:36 pm    Post subject:
Reply with quote

Hi Mickeydusaor

Yes..this was an existing macro for SYSPROC at my site, which has been there for quite some time.

Hi Pedro

Yes.. I was executing it after logging into ISPF. I realized my mistake.

Anyways, the issue is resolved now. I have been given the access to one of the test dataset which is already allocated to ISPPLIB. So now I can directly test it from 7.2 option.

Thanks.
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts FTOPEN TEMP is failing due to dataset... mbenaud TSO/ISPF 7 Thu Jul 28, 2016 4:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us