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

LIBDEF +++ RC(-3) +++


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Billi

New User


Joined: 29 Jun 2010
Posts: 9
Location: tel-aviv

PostPosted: Tue Jun 29, 2010 3:08 pm
Reply with quote

The following Rexx clist which is invoked on entry to ISPF receives +++ RC(-3) +++ error. Why?

ADDRESS ISPEXEC
7 *-* "LIBDEF ISPPLIB DATASET ID('SPL.MXI43.ISPPLIB') STACK"
+++ RC(-3) +++
8 *-* "LIBDEF ISPTLIB DATASET ID('SPL.MXI43.ISPTLIB') STACK"
+++ RC(-3) +++
9 *-* "LIBDEF ISPLLIB DATASET ID('SPL.MXI43.LOAD') STACK"
+++ RC(-3) +++
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Jun 29, 2010 3:18 pm
Reply with quote

most probably because the ISPF environment has not been properly established
Back to top
View user's profile Send private message
Billi

New User


Joined: 29 Jun 2010
Posts: 9
Location: tel-aviv

PostPosted: Tue Jun 29, 2010 4:19 pm
Reply with quote

The clist is the last one invoked by the tso procedure. All other allocation were done. Why is this LIBDEF cause an error? icon_confused.gif icon_confused.gif
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Jun 29, 2010 4:24 pm
Reply with quote

Is this a recent addition.
What exactly are you trying to achieve.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Jun 29, 2010 4:32 pm
Reply with quote

Quote:
The clist is the last one invoked by the tso procedure

because most probably the ISPF environment has not been setup YET
Back to top
View user's profile Send private message
Billi

New User


Joined: 29 Jun 2010
Posts: 9
Location: tel-aviv

PostPosted: Tue Jun 29, 2010 5:16 pm
Reply with quote

I understand. So what is the best way to concatenate libraries to an existing allocations at this stage icon_question.gif
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Jun 29, 2010 5:28 pm
Reply with quote

This is the code that I use. A bit schoolboyish, but it was written about 30 years ago and hasn't changed since.
Code:
/* REXX *** INSERT PRIVATE ISPF LIBRARIES INTO CURRENT LOGON CONCAT  */
UID = STRIP(SYSVAR(SYSUID))

PRX = UID".REXX"
IF SYSDSN("'"STRIP(PRX)"'") <> "OK"
   THEN PRX=''
PCL = UID".CLIST"
IF SYSDSN("'"STRIP(PCL)"'") <> "OK"
   THEN PCL = ''
PPA = UID".PANELS"
IF SYSDSN("'"STRIP(PPA)"'") <> "OK"
   THEN PPA=''
PSK = UID".SKELS"
IF SYSDSN("'"STRIP(PSK)"'") <> "OK"
   THEN PSK=''

RX0 = 0
CL0 = 0
PA0 = 0
SK0 = 0

A = 1
Y = MSG('OFF')
X=OUTTRAP(LIST.)
"LISTA STATUS"
X=OUTTRAP(OFF)
"FREE    FI(TEST01)"
"ALLOC   FI(TEST01) RECFM(F B) LRECL(133) TRACKS SPACE(5 5) NEW "
DO FOREVER
   A = A + 1
   IF A > LIST.0 THEN LEAVE
   DSNAME = SUBSTR(LIST.A,1,44)
   IF SUBSTR(DSNAME,1,8) = 'TERMFILE' THEN ITERATE
   IF SUBSTR(DSNAME,1,8) = '--DDNAME' THEN ITERATE
   A = A + 1
   IF A > LIST.0 THEN LEAVE
   NEXTDD = SUBSTR(LIST.A,3,8)
   IF NEXTDD <> ' ' THEN DO
     DDNAME = NEXTDD
   END
   PUSH DDNAME DSNAME
   "EXECIO 1 DISKW TEST01"
END

"EXECIO 0 DISKW TEST01 ( FINIS"
"EXECIO * DISKR TEST01 ( STEM LIBS. FINIS"
"FREE    FI(TEST01)"
DO A = 1 TO LIBS.0
  PARSE VAR LIBS.A DD DSN
  IF DD = "SYSPROC" THEN DO
    IF CL0 = 0 THEN DO
      CL0 = 1
      IF PCL <> ""
         THEN  STRCL = "'"PCL"' '"STRIP(DSN)"'"
         ELSE  STRCL = "'"STRIP(DSN)"'"
    END
    ELSE  STRCL = STRCL "'"STRIP(DSN)"'"
  END
  ELSE IF DD = "SYSEXEC" THEN DO
    IF RX0 = 0 THEN DO
      RX0 = 1
      IF PRX <> ""
         THEN  STRRX = "'"PRX"' '"STRIP(DSN)"'"
         ELSE  STRRX = "'"STRIP(DSN)"'"
    END
    ELSE  STRRX = STRRX "'"STRIP(DSN)"'"
  END
  ELSE IF DD = "ISPPLIB" THEN DO
    IF PA0 = 0 THEN DO
      PA0 = 1
      IF PPA <> ""
         THEN  STRPA = "'"PPA"' '"STRIP(DSN)"'"
         ELSE  STRPA = "'"STRIP(DSN)"'"
    END
    ELSE  STRPA = STRPA "'"STRIP(DSN)"'"
  END
  ELSE IF DD = "ISPSLIB" THEN DO
    IF SK0 = 0 THEN DO
      SK0 = 1
      IF PSK <> ""
         THEN  STRSK = "'"PSK"' '"STRIP(DSN)"'"
         ELSE  STRSK = "'"STRIP(DSN)"'"
    END
    ELSE  STRSK = STRSK "'"STRIP(DSN)"'"
  END
END

"FREE FI(SYSPROC)"
"ALLOC FI(SYSPROC) DA("STRCL") SHR"

"FREE FI(SYSEXEC)"
"ALLOC FI(SYSEXEC) DA("STRRX") SHR"

"FREE FI(ISPPLIB)"
"ALLOC FI(ISPPLIB) DA("STRPA") SHR"

"FREE FI(ISPSLIB)"
"ALLOC FI(ISPSLIB) DA("STRSK") SHR"
Back to top
View user's profile Send private message
Billi

New User


Joined: 29 Jun 2010
Posts: 9
Location: tel-aviv

PostPosted: Tue Jun 29, 2010 5:56 pm
Reply with quote

Thanks,

It helped
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Jun 29, 2010 6:14 pm
Reply with quote

On the system I work on, the Systems Programmers left an option to call a member "PROFILE" of each user's personal PDS. I set mine up to just easily and simply concatenate a couple of datasets to the existing allocations:

/* REXX */
...
"ALLOC F(MYEXEC) DA(REXX) SHR REU"
Call bpxwdyn "CONCAT DDLIST(SYSPROC,MYEXEC) MSG(2)"
...
Exit 0
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Panel not found on PF3 with libdef of... TSO/ISPF 2
No new posts LIBDEF not working in called proc CLIST & REXX 0
No new posts What is the purpose of LIBDEF keyword? TSO/ISPF 1
No new posts How to call LIBDEF using ISPLINK COBOL Programming 14
No new posts problem in LIBDEF service CLIST & REXX 3
Search our Forums:

Back to Top