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
 

 

Trouble saving to the right ISPTLIB dataset

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

Active User


Joined: 16 Apr 2008
Posts: 104
Location: South Carolina

PostPosted: Fri Jan 15, 2010 2:20 am    Post subject: Trouble saving to the right ISPTLIB dataset
Reply with quote

My code is working, but it does not save my ISPF table to the right library. These are snippets of my code:

Prepares the library:

Code:
  ISPTLIB = USERID()'.SCRNPNTR.LOG'

  IF SYSDSN("'"ISPTLIB"'") = 'OK' THEN
    NOP
  ELSE DO
    ADDRESS TSO
    "ALLOC NEW UNIT(SYSDA) SPACE(1,1)",
    "DSORG(PS) BLKSIZE(0) LRECL(80) RECFM(F B)",
    "CYL DSNTYPE(PDS) DIR(50) REUSE DSNAME('"ISPTLIB"')"
  END

  ADDRESS ISPEXEC
  "LIBDEF ISPTABL DATASET ID('"ISPTLIB"') STKADD"
  "LIBDEF ISPTLIB DATASET ID('"ISPTLIB"') STKADD"

  ADDRESS TSO
  "TRX ADD FI(ISPPLIB) DA('"ISPPLIB"') SHR"
  "TRX ADD FI(ISPLLIB) DA('"ISPLLIB"') SHR"
  "TRX ADD FI(SYSPROC) DA('"SYSPROC"') SHR"
  "TRX ADD FI(ISPTLIB) DA('"ISPTLIB"') SHR"


Now do some logic and populate a table:
Code:
  ADDRESS ISPEXEC
  'TBEND' SCREEN
  'TBERASE' SCREEN
  'TBCREATE' SCREEN 'KEYS(FLDCNT)',
    'NAMES(FLDNME FLDLEN FLDPICI FLDPICO FLDOCC)'

  CALL PROCESS_COPYBOOK

  ADDRESS ISPEXEC
  'TBSAVE' SCREEN 'REPLCOPY LIBRARY(ISPTABL)'
  'TBCLOSE' SCREEN

...

PROCESS_COPYBOOK
  FLDCNT = FLDCNT + 1
  FLDNME = NAME
  FLDLEN = LEN
  FLDOCC = OCCRNCE

  ADDRESS ISPEXEC
  'TBADD' SCREEN
RETURN


And after doing this, my table is saved, but not to the library that is defined in ISPTLIB. When I look at my concatenation in TRX, it is being stored in a library that is concatenated above my library. Any thoughts?
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1746
Location: Bloomington, IL

PostPosted: Fri Jan 15, 2010 2:45 am    Post subject:
Reply with quote

Only one library -- the first allocated to ISPTABL -- can be written to. I recommend that you add appropriate logic to detect and store the existing allocation(s), allocate only your library to ISPTABL, and reverse those steps upon exit.
Back to top
View user's profile Send private message
valyk

Active User


Joined: 16 Apr 2008
Posts: 104
Location: South Carolina

PostPosted: Fri Jan 15, 2010 2:55 am    Post subject:
Reply with quote

I was under the impression that

Code:
  ADDRESS ISPEXEC
  "LIBDEF ISPTABL DATASET ID('"ISPTLIB"') STKADD"
  "LIBDEF ISPTLIB DATASET ID('"ISPTLIB"') STKADD"


Would add the library to the top of the concatenation. Does it not?

http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.f54sg00/zampq6.htm
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Fri Jan 15, 2010 6:27 am    Post subject: Reply to: Trouble saving to the right ISPTLIB dataset
Reply with quote

you can't write to ISPTLIB. It is a concatenation and you can not write to a concatenated set of libraries. I think ISPF tables are written to ISPTABL (ISPPROF for internal tables) and those must not have more than one data set because you can't write to a concatenated dd. LIBDEF just allocates the library to another ddname and ISPF uses that dd in addition to the actual ddname. Try the ISPLIBD command in ISPF to see your libdefs.
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