Duane
Run this using ISPF in batch. To execute it for a different
HLQ than your userid: TSO %clstname L(HLQ)
PROC 0 L(&SYSUID) G(SAVE)
/* */
/* Quick ISPF save of data set names. This is much quicker */
/* than using OPT 3.4, because it does not do an obtain */
/* for each data set in the list because of STATS(NO). */
/* The dsn created will be USERID.SAVE.DATASETS */
/* */
ISPEXEC CONTROL ERRORS RETURN
ISPEXEC LMDINIT LISTID(LISTID) LEVEL(&L)
ISPEXEC LMDLIST LISTID(&LISTID) OPTION(SAVE) STATS(NO) GROUP(&G)
WRITE COMPLETE!! RETURN CODE WAS &LASTCC
ISPEXEC LMDFREE LISTID(&LISTID)
Mark
--
Mark Zelden
Sr. Software and Systems Architect
mailto: mark....@zurichna.com
Systems Programming expert at http://Search390.com/ateExperts/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html
Thanks
"Duane Weaver" <weav...@OSU.EDU>
Sent by: "ISPF discussion list" <ISP...@LISTSERV.ND.EDU>
03/29/2004 12:23 PM
Please respond to "ISPF discussion list"
To: ISP...@LISTSERV.ND.EDU
cc:
Subject: ISPF 3.4 in batch?
I'm not logged on right now but I think you should be able to do what you
want by calling a REXX program in batch that sets a command string to
something like "TSO DOIT;SAVE;END;END" and then displays a dummy panel to
execute the command string. The first command in the string (i.e. TSO DOIT)
would invoke a second REXX program that looks something like this:
"LMDINIT LISTID(LISTID) LEVEL("dsn")"
"LMDDISP LISTID("listid")"
In other words, this would display a 3.4 DSLIST. The SAVE command would then
execute on the DSLIST command line and the END command would then exit the
list. The second END command would exit the dummy display panel and control
would return to the original REXX. As the process is running in batch, you
shouldn't need to worry about issuing LMDFREE as the listid will
automatically be freed when the batch job terminates the ISPF session. I
don't know for sure this approach would work but unless anyone has any other
suggestions it might be a place to start. HTH,
Dave Salt
Soft-Center Solutions Inc.
http://www.soft-center.com
1-877-SoftCen
Bringing you SimpList(tm) - The easiest, most powerful way to surf a
mainframe!
>From: Duane Weaver <weav...@OSU.EDU>
>Reply-To: ISPF discussion list <ISP...@LISTSERV.ND.EDU>
>To: ISP...@LISTSERV.ND.EDU
>Subject: ISPF 3.4 in batch?
>Date: Mon, 29 Mar 2004 15:23:33 -0500
>
>Is it possible to some how run ISPF 3.4 in batch produce a hard copy
>listing of file names (not the contents).
>
>
>Duane
_________________________________________________________________
Add photos to your messages with MSN Premium. Get 2 months FREE*
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
Dave Salt
Soft-Center Solutions Inc.
http://www.soft-center.com
1-877-SoftCen
Bringing you SimpList(tm) - The easiest, most powerful way to surf a
mainframe!
>From: Mark Zelden <mark....@ZURICHNA.COM>
>Reply-To: ISPF discussion list <ISP...@LISTSERV.ND.EDU>
>To: ISP...@LISTSERV.ND.EDU
>Subject: Re: ISPF 3.4 in batch?
>Date: Mon, 29 Mar 2004 16:02:22 -0500
>
>On Mon, 29 Mar 2004 15:23:33 -0500, Duane Weaver <weav...@OSU.EDU> wrote:
>
> >Is it possible to some how run ISPF 3.4 in batch produce a hard copy
> >listing of file names (not the contents).
> >
> >
> >Duane
>
>Run this using ISPF in batch. To execute it for a different
>HLQ than your userid: TSO %clstname L(HLQ)
>
>
>PROC 0 L(&SYSUID) G(SAVE)
> /* */
> /* Quick ISPF save of data set names. This is much quicker */
> /* than using OPT 3.4, because it does not do an obtain */
> /* for each data set in the list because of STATS(NO). */
> /* The dsn created will be USERID.SAVE.DATASETS */
> /* */
> ISPEXEC CONTROL ERRORS RETURN
> ISPEXEC LMDINIT LISTID(LISTID) LEVEL(&L)
> ISPEXEC LMDLIST LISTID(&LISTID) OPTION(SAVE) STATS(NO) GROUP(&G)
> WRITE COMPLETE!! RETURN CODE WAS &LASTCC
> ISPEXEC LMDFREE LISTID(&LISTID)
>
>
>Mark
>
>--
>Mark Zelden
>Sr. Software and Systems Architect
>mailto: mark....@zurichna.com
>Systems Programming expert at http://Search390.com/ateExperts/
>Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html
_________________________________________________________________
Free yourself from those irritating pop-up ads with MSn Premium. Get 2months
FREE*
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
I gather the JCL would need the proper DD statements allocated for both
TSO and ISPF to do this in the batch?
Duane
>I am simply looking for something to give to a user who wants a hardcopy
>listing of their file names. Nothing fancy at all.
>
>I gather the JCL would need the proper DD statements allocated for both
>TSO and ISPF to do this in the batch?
>
>Duane
>
Yes. And you need to execute ISPF. Example using my CLIST I posted:
//SYSTSIN DD *
PROFILE PREFIX(userid)
ISPSTART CMD(%clstname L(hlq)) NEWAPPL(ISR)
For a complete JCL sample of using ISPF in batch either search the
archives or go to http://search390.com and search for ISPF BATCH.
I know I've posted a sample in the ATE section of the search390 web
site.
If all they want is a hardcopy instead of running in batch, just
have them use the SAVE command or SAVE ZZZ command from 3.4 and print
their list data set or ZZZ data set in any number of ways.
Regards,
Here is the JCL:
//yourjob JOB (0000),'BATCH LMDLIST',MSGCLASS=T,REGION=0M
/*JOBPARM SYSAFF=*
//***************************************************************
//* LMDLIST *
//***************************************************************
//LMDLIST EXEC PGM=IKJEFT01
//SYSEXEC DD DSN=your.exec.pds,DISP=SHR
//ISPPLIB DD DSN=your.system.ISPPLIB,DISP=SHR
//ISPSLIB DD DSN=your.system.ISPSLIB,DISP=SHR
//ISPMLIB DD DSN=your.system.ISPMLIB,DISP=SHR
//ISPTLIB DD DSN=your.system.ISPTLIB,DISP=SHR
//ISPTABL DD DSN=your.system.ISPTLIB,DISP=SHR
//ISPPROF DD DSN=&&TLIB,DISP=(,PASS),SPACE=(CYL,(10,1,10)),
// UNIT=SYSDA,LRECL=80,BLKSIZE=0,RECFM=FB
//ISPLOG DD SYSOUT=*,DCB=(RECFM=VA,LRECL=125,BLKSIZE=129)
//SYSTSPRT DD SYSOUT=*
//DIAGMSGS DD SYSOUT=*
//SYSTSIN DD *
ISPSTART CMD(LMDLIST HLQ.* PRINT)
Here is the EXEC:
/*********************************************************************/
/* REXX */
/*********************************************************************/
/* Purpose: List all DSN's in a pattern and calculate space usage */
/*-------------------------------------------------------------------*/
/* Syntax: LMDLIST pattern print */
/*-------------------------------------------------------------------*/
/* Parms: LEVEL - Valid ISPF DSN pattern for 3.4 */
/* PRINT - Print the DSN list (PRINT or NOPRINT) */
/* */
/*********************************************************************/
/* Change Log */
/* */
/* Author Date Reason */
/* -------- --------- ----------------------------------------- */
/* R. Zenuk Oct 2003 Initial Creation */
/* */
/*********************************************************************/
/* Accept the pattern or default to current userid */
/*********************************************************************/
arg level print
if level = '' then level = userid()
if print = '' then print = 'PRINT'
/*********************************************************************/
/* Set tracks/Cylinder and Cylinders/Volume for calculations */
/*********************************************************************/
trk2cyl = 15
cyl2vol = 10017
tracks = 0
/*********************************************************************/
/* Create a little heading */
/*********************************************************************/
if print = 'PRINT' then
do
say
say 'DSNs for' level
say
end
/*********************************************************************/
/* Invoke the ISPF LMDINIT service for LMDLIST */
/*********************************************************************/
address ISPEXEC
"LMDINIT LISTID(LIST) LEVEL("level")"
do forever
/*********************************************************************/
/* Loop through all the DSNs provided by LMDLIST */
/*********************************************************************/
"LMDLIST LISTID("list") OPTION(LIST) DATASET(DSN) STATS(YES)"
if RC = 8 then leave
/*********************************************************************/
/* Optional print of DSN's */
/*********************************************************************/
if print = 'PRINT' then say left(dsn,40) zdlvol zdlsize
/*********************************************************************/
/* Calculate space usage. Bypass MIGRATed DSN's and Aliases */
/*********************************************************************/
if zdlvol <> 'MIGRAT' & zdlvol <> '*ALIAS' & zdlsize <> '' then
tracks = tracks + zdlsize
end
/*********************************************************************/
/* Cleanup */
/*********************************************************************/
"LMDLIST LISTID("list") OPTION(FREE)"
"LMDFREE LISTID(LIST)"
/*********************************************************************/
/* Print totals */
/*********************************************************************/
say
say 'Space usage:'
say
say 'Total Tracks =' tracks 'Total Cylinders =' tracks/trk2cyl,
'Total Volumes =' (tracks/trk2cyl)/cyl2vol
say
You can add the following zdl* variables to the SAY statement to get more
dataset info (from the ISPF Services Manual - LMDLIST):
ZDLVOL
Volume serial.
ZDLDEV
Device type.
ZDLDSORG
Data set organization.
ZDLRECFM
Record format.
ZDLLRECL
Logical record length.
ZDLBLKSZ
Block size.
ZDLSIZE
Data set size in tracks.
ZDLUSED
Percentage of used tracks or pages (PDSE).
ZDLEXT
Number of extents used.
ZDLCDATE
Creation date.
ZDLEDATE
Expiration date.
ZDLRDATE
Date last referenced.
ZDLMIGR
Whether the data set is migrated ('YES' or 'NO') based on the value
of the Volume_of_migrated_data_sets keyword in ISPF configuration table. If
the volume name of the data set matches the value of
Volume_of_migrated_data_sets, ZDLMIGR is set to 'YES', otherwise it is
set to 'NO'.
ZDLDSNTP
Dsname type ('PDS', 'LIBRARY', or ' ').
ZDLSPACU
Space units.
ZUDMVOL
Whether the data set is multivolume (Y) or not (N).
Hope This Helps,
Rob
This comes pretty close:
//IDCAMS EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENTRIES(HLQ.MLQ.*)
You can probably fiddle around with the LISTCAT parameters to make the listing have the format you want...
> -----Original Message-----
> From: Duane Weaver [mailto:weav...@OSU.EDU]
> Sent: Monday, March 29, 2004 4:36 PM
> To: ISP...@LISTSERV.ND.EDU
> Subject: Re: ISPF 3.4 in batch?
>
>
Gene
-----Original Message-----
From: ISPF discussion list [mailto:ISP...@LISTSERV.ND.EDU] On Behalf Of
Duane Weaver
Sent: Monday, March 29, 2004 1:36 PM
To: ISP...@LISTSERV.ND.EDU
Subject: Re: ISPF 3.4 in batch?
I am simply looking for something to give to a user who wants a hardcopy
listing of their file names. Nothing fancy at all.
I gather the JCL would need the proper DD statements allocated for
both
TSO and ISPF to do this in the batch?
Duane
At 04:14 PM 3/29/2004, you wrote:
>Duane:
>
>This comes pretty close:
>
>//IDCAMS EXEC PGM=IDCAMS
>//SYSPRINT DD SYSOUT=*
>//SYSIN DD *
> LISTCAT ENTRIES(HLQ.MLQ.*)
>
The problem is that IDCAMS LISTCAT doesn't support the kind of
filtering/wildcards that ISPF 3.4 does (yet).