Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1786
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 Question about dataset sequence numbe... harisukumaran JCL & VSAM 23 Tue May 29, 2018 9:31 am
No new posts Temp dataset unusual behavior sheersh JCL & VSAM 5 Tue May 08, 2018 9:52 pm
No new posts How could i share my personal dataset... James Halley TSO/ISPF 1 Fri Mar 23, 2018 9:41 pm
This topic is locked: you cannot edit posts or make replies. How could i share my personal dataset... samenxia163 TSO/ISPF 1 Fri Mar 09, 2018 12:18 pm
No new posts Where to get sample for processing RM... vice_versa PL/I & Assembler 2 Tue Jan 16, 2018 2:03 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us