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
 

 

Using ISPSTART and dealing with the Log Data Set

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

New User


Joined: 26 Mar 2009
Posts: 5
Location: Brisbane

PostPosted: Tue Nov 06, 2012 11:10 am    Post subject: Using ISPSTART and dealing with the Log Data Set
Reply with quote

Greetings,

I am writing a REXX (JERECALL) that will be called via MYLOGON to recall migrated datasets.

I would like to call this REXX via MYLOGON, so it happens automatically. I have used LMDINIT & LISTDSI in JERECALL to retrieve a list of datasets, then iterate through them only recalling datasets that are flagged as migrated. However, I found that the certain commands can only be execute during an ISPF session and MYLOGON executes before ISPF is loaded. I could call the JERECALL rexx via the ISPSTART command and the LMDINIT & LISTDSI commands work. My next hurdle was the JERECALL was interrupted by the "Specify Disposition of Log Data Set" screen, which requests manual intervention to select a process option and press enter to continue past this screen. I overcame this by disabling the Log Data Set in my ISPF Settings under Log Dataset defaults.

I have read through the ISPSTART syntax:
http://publib.boulder.ibm.com/infocenter/zos/v1r12/index.jsp?topic=%2Fcom.ibm.zos.r12.f54dg00%2Fhstart.htm

My questions are:

1. Is there a way to call ISPSTART with a /nolog option, or a way to close the dataset manually?

2. Is there a better way to do what I am doing?


MYLOGON looks like this:

Code:
"ISPSTART CMD(%JERECALL USERID) MODE(FSCR) NEWAPPL(LALA)"




JERECALL looks like this:

Code:
  ADDRESS TSO         
    ARG UID                                                 
    DSN = UID || '.*'                                                   
    MSGVAL = MSG('OFF')                                                 
    "ISPEXEC LMDINIT LISTID(LID) LEVEL(&DSN)"                           
    DO I = 1 TO 1000                                                     
       "ISPEXEC LMDLIST LISTID("LID") OPTION(LIST) DATASET(DSN)"       
       IF RC = 0 THEN                                                   
         DO                                                             
           QDSN = "'" || DSN || "'"                                     
           FC = LISTDSI(QDSN NORECALL)                                 
           IF FC = 16 & SYSREASON = 9 THEN "HRECALL" QDSN "NOWAIT"     
         END                                                           
       ELSE LEAVE                                                       
    END /* DO I */                                                     
    MSGVAL = MSG(MSGVAL)                                               
  EXIT 0                       




For those interested, to disable the Log Data Set:

At the ISPF main menu.

0 Settings Terminal and user parameters

Log/List - Top left menu

1. Log Data set defaults

Code:
EsssssssssssssssssssssssssssssssssssssN
e 1  1. Log Data set defaults         e
e    2. List Data set defaults        e
e    3. List Data set characteristics e
e    4. JCL...                        e
DsssssssssssssssssssssssssssssssssssssM

Change the Primary pages and Secondary pages to 0.

Code:
Essssssssssssssssssssssssssss ISPF Settings ssssssssssssssssssssssssssssN
e                        Log Data Set Defaults                          e
e                                                          More:     +  e
e Process option . . . . 2  1. Print data set and delete                e
e                           2. Delete data set (without printing)       e
e                           3. Keep data set (append subsequent         e
e                              information to same data set)            e
e                           4. Keep data set and allocate new data set  e
e Batch SYSOUT class . .                                                e
e Local printer ID or                                                   e
e writer-name  . . . . .                                                e
e Local SYSOUT class . .                                                e
e Lines per page . . . . 60                                             e
e Primary pages  . . . . 0                                              e
e Secondary pages  . . . 0                                              e
e Log Message ID . . . .    (/ = Yes)                                   e
e  F1=Help       F2=Split      F3=Exit       F7=Backward   F8=Forward   e
e  F9=Swap      F12=Cancel                                              e
DsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssM



Please note: If you have performed actions in the ISPF session, the log/list dataset will have already been created. This means you will see the "Specify Disposition of Log Data Set" screen 1 last time. The next time you log in and perform actions, the dataset will NOT be created and the screen will not appear when you go to exit.



Thank you for your assistance.

Regards,
James Emerson
Back to top
View user's profile Send private message

PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Nov 06, 2012 11:32 am    Post subject:
Reply with quote

http://www-01.ibm.com/support/docview.wss?uid=swg21023994
Back to top
View user's profile Send private message
Stefan

Active User


Joined: 12 Jan 2006
Posts: 110
Location: Germany

PostPosted: Tue Nov 06, 2012 3:43 pm    Post subject: Re: Using ISPSTART and dealing with the Log Data Set
Reply with quote

James Emerson wrote:
Is there a better way to do what I am doing?

Look at the LISTDSI TSO/E external function. The statement x = LISTDSI('my.data.set' 'NORECALL') will populate the REXX variable sysreason with a value of 9 if DFHSM migrated the dataset. The parameter 'NORECALL' itself prevents the retrieval of the dataset.
Using this function there will be no need for an active ISPF environment anymore and thus you can get rid of ISPSTART.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Tue Nov 06, 2012 8:26 pm    Post subject: Reply to: Using ISPSTART and dealing with the Log Data Set
Reply with quote

Quote:
2. Is there a better way to do what I am doing?

You are using LMDINIT and LMDLIST to get the names of datasets. You should use OUTTRAP and LISTCAT instead. This would remove the requirement to start ISPF first.

-OR- you could stop trying to circumvent the storage management policies and only recall datasets when you need them.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Nov 06, 2012 8:48 pm    Post subject:
Reply with quote

Hello,

Quote:
you could stop trying to circumvent the storage management policies and only recall datasets when you need them.
Has someone told you that your convenience is worth the negative impact on the system?

As Pedro mentions, it is best to recall datasets when needed - Not have them always available.

Possibly i misunderstand.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Wed Nov 07, 2012 2:43 am    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

Quote:
you could stop trying to circumvent the storage management policies and only recall datasets when you need them.
Has someone told you that your convenience is worth the negative impact on the system?

As Pedro mentions, it is best to reacll datasets when neede - Not have them always available.

Possibly i misunderstand.
In our shop we actually have an officially sanctioned tool that facilitates mass HRECALLs of data base data sets. The reason it exists is that we have a lot of distributed apps that communicate with our host data bases via IMS/Connect, JDBC and MQ. The folks who develop those applications usually have minimal mainframe knowledge so the tool makes it easy for them to perform their own recalls.

The tool also optionally resets the 'last used' date on unmigrated data sets so that migration can be prevented.

I used to have my own clandestine tool that did this sort of thing, and I always felt a little bit guilty whenever I used it. Not any more; I have retired it and now use the official tool with a clear conscience.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Wed Nov 07, 2012 4:43 am    Post subject: Reply to: Using ISPSTART and dealing with the Log Data Set
Reply with quote

Quote:
facilitates mass HRECALLs of data base data sets.


I suppose it is the number of recalls that might be a problem. Twenty or so datasets might not be noticed.

But, for example, my HLQ has 1700+ datasets. Recalling that many datasets would be noticed. Someone with large numbers of datasets cannot unilaterally decide to have every dataset online all of the time.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Wed Nov 07, 2012 6:01 am    Post subject:
Reply with quote

A typical test data base in our shop (consisting of DB2 table spaces and IMS data bases) has over 3,000 data sets, so some of our recalls are large.

It's a question of trade offs. It would certainly be possible to exempt data base data sets from migration and therefore avoid the need to recall them. This of course would greatly increase the space utilization on the primary volumes. Years ago it was decided that it was preferable to migrate the data sets after n days of disuse and put up with the occasional large recall.
Back to top
View user's profile Send private message
James Emerson

New User


Joined: 26 Mar 2009
Posts: 5
Location: Brisbane

PostPosted: Wed Nov 07, 2012 6:20 am    Post subject: Reply to: Using ISPSTART and dealing with the Log Data Set
Reply with quote

PeterHolland

Your suggestion works.

I changed JERECALL EXIT 0 to EXIT 4.
As long as you have a default action set 1,2,3,4 it will perform that one with out displaying the screen. If you do not have a default set, the screen still displays.
As I have set up a default of 2 (Delete data set without printing) this allows me to keep my Log/List and run this rexx to recall my datasets.

Thank you for that PeterHolland.



Stefan

I am not sure I understand your solution.

Are you saying that I should just remove the 'NORECALL' from the LISTDSI statement from the JERECALL REXX and then I can remove the ISPSTART from the MYLOGON REXX?

If I perform this,

MYLOGON:
Code:
"%JERECALL UBTUD"


JERECALL:
Code:
"ISPEXEC LMDINIT LISTID(LID) LEVEL(&DSN)"
"ISPEXEC LMDLIST LISTID("LID") OPTION(LIST) DATASET(DSN)"


Both the ISPEXEC return the following error as ISPSTART is not used in MYLOGON to call JERECALL:
Code:
ISPS118L SERVICE NOT INVOKED. A VALID ISPF ENVIRONMENT DOES NOT EXIST.

Code:
FC = LISTDSI(QDSN NORECALL)

Without the 'NORECALL' you are very right, it automatically recalls.

However I believe it increases the time of the MYLOGON execution as it waits for the recall to complete before moving to the next dataset. And it returns the following message for each dataset that is migrated:
Code:
 ARC1020I DFSMSHSM IS RECALLING FROM DASD DSN=DATASETNAME, YOU MAY CONTIN
UE THE RECALL IN THE BACKGROUND AND FREE YOUR TSO SESSION BY PRESSING THE ATTENT
ION KEY


To overcome that problem, I added the 'NORECALL' option to the LISTDSI call. I also found it gave me more control over what I was recalling, as I could report a list of migrated datasets that have been recalled.

If I have mis-understood your suggestion please let me know.

Thank you Stefan for the feedback.



Pedro

I have had a read of the following:

OUTTRAP:
http://publib.boulder.ibm.com/infocenter/zos/v1r12/index.jsp?topic=%2Fcom.ibm.zos.r12.ikjc300%2Ftrap.htm

LISTCAT:
http://publib.boulder.ibm.com/infocenter/zos/v1r12/index.jsp?topic=%2Fcom.ibm.zos.r12.idai200%2Fdgt2i29067.htm

I have implemented your suggestion, and it looks like this (please let me know if i have mis-interpreted what you wrote)

Code:
  ADDRESS TSO                                                           
                                                                       
    x = OUTTRAP('var.')                                                 
                                                                       
    "LISTCAT"                                                           
                                                                       
    DO i = 2 TO var.0                                                   
      dsn = "'" || var.i || "'"                                         
      SAY i 'recalling:' || dsn || ':'                                 
      "HRECALL" dsn "NOWAIT"                                           
    END                                                                 
                                                                       
    x = OUTTRAP('OFF')       /* turns trapping OFF */                   
                                                                       
  exit 0                                           


You are very right, I no longer require the ISPSTART to run this as the LISTCAT and HRECALL are TSO.

However it does not seem to trap the following spam:

Code:
ARC1001I USERID.DATASETNAME RECALL FAILED, RC=0002, REAS=0000
ARC1102I DATA SET IS NOT MIGRATED/BACKED UP                     


I have very few datasets personally, less then 100. It would be a pain if someone had to press enter every screen as it generates 2 lines for every dataset that is not migrated.

Thank you for your suggestion Pedro



Pedro & dick scherrer

You are correct, that it could be seen as circumventing the storage management policies.

At our site, our datasets vanish after a few weeks. I am mainly writing this REXX to recall my datasets when I go on leave for a month+. I will ask someone to add this to their log on, so when I return I can continue work with out the loss of all my important datasets.

Thank you Pedro & dick scherrer



For the record:

I think I will keep my original code.
Change the Exit 0 to Exit 4 in JERECALL.
Set option 2 as a default for the Log/List.

And this will satisfy my requirements.


Thank you all for your input =)
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Nov 07, 2012 7:04 am    Post subject:
Reply with quote

Hello,

Quote:
so when I return I can continue work with out the loss of all my important datasets.

Suggest you work with your storage management people and learn why any of your datasets are LOST. Archived maybe, but hopefully not Gone.

Possibly there is a way for your "keeper" datasets to be placed in a storage class where they will not be deleted, but archived. This too would be working with the storage magement people.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Wed Nov 07, 2012 8:12 pm    Post subject: Reply to: Using ISPSTART and dealing with the Log Data Set
Reply with quote

Quote:
It would be a pain if someone had to press enter every screen

You need to use the VOLUME parameter of the LISTCAT command. If the volume is MIGRAT, do not issue the recall.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Wed Nov 07, 2012 8:33 pm    Post subject:
Reply with quote

Quote:
At our site, our datasets vanish after a few weeks. I am mainly writing this REXX to recall my datasets when I go on leave for a month+. I will ask someone to add this to their log on, so when I return I can continue work with out the loss of all my important datasets.


Could you simply issue an HBACK on your 'important' datasets before you leave,

Then issue an HRECOVER for those that are gone (or all of them) when you return?

No need to mess with them every day.

Just a thought.
Back to top
View user's profile Send private message
James Emerson

New User


Joined: 26 Mar 2009
Posts: 5
Location: Brisbane

PostPosted: Mon Nov 12, 2012 6:41 am    Post subject:
Reply with quote

Hi again, here is my new solution using LISTCAT VOLUME. I have gutted out the extra code just to show the basic flow of it so people can see it. Thank you Pedro, now I dont need to use ISPSTART which is great.

Code:
/* YOU CAN CALL FROM MYLOGON VIA:                                     */
/*   - "%JERECALL USERID"                                             */

*** JERECALL REXX***

  ADDRESS TSO

    PARSE UPPER ARG UID DIS

    DSN = UID || '.*'

    X = OUTTRAP('VAR.')

    "LISTCAT VOLUME"

    RECALL_COUNT = 0
    START_RECALL = 'N'

    DO I = 1 TO VAR.0
       VAR = STRIP(VAR.I)

       IF POS(UID,VAR) > 0 THEN DS = 'Y'
       ELSE                     DS = 'N'

/*     SKIM THE ARRAY FOR THE FIRST DATASET TO CHECK                  */
       SELECT
         WHEN START_RECALL = 'N' & DS = 'Y' THEN START_RECALL = 'Y'
         WHEN START_RECALL = 'N'            THEN ITERATE
         OTHERWISE NOP
       END /* SELECT */

/*     THE ARRAY CONTAINS 3 LINES FOR EACH DATASET WHICH LOOK LIKE:   */
/*       - DATASET NAME : "DATASET"                                   */
/*       - OPTION TYPE  : "  --VOLUMES--"                             */
/*       - VOLUME STATUS: "    MIGRAT     "                           */
       TEXT = STRIP(VAR.I)
       SELECT
         WHEN DS = 'Y' THEN DSN = "'" || TEXT || "'"
         WHEN POS(TEXT,'--VOLUMES--') > 0 THEN NOP
         OTHERWISE IF POS(TEXT,'MIGRAT') THEN "HRECALL" DSN "NOWAIT"
       END /* SELECT */
    END /* DO I */

/*  TURN TRAPPING OFF                                                 */
    X = OUTTRAP('OFF')

  EXIT 0


Thank you.
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 Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm


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