View previous topic :: View next topic
|
Author |
Message |
jerryte
Active User
Joined: 29 Oct 2010 Posts: 202 Location: Toronto, ON, Canada
|
|
|
|
I want to copy a SEQ dataset into a PDS member and then create statistics for the member. IEBCOPY or IEBGENER can do the copy but it doesn't generate the stats.
I could code a rexx to use ISPF services calls and do LMCOPY and LMSTATS. My question - is there an existing utility that can do this? Saves me from having to re-invent the wheel. I don't mind the challenge of coding a rexx but would prefer something "off the shelf". |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
PDS86 from CBTTAPE.ORG. The command ATTR ADDSTATS does exactly that. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
I suspect Jerryte is thinking about something like this -
Code: |
//F EXEC PGM=COPYSTAT
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD *
IEFBR14 RSECT
IEFBR14 AMODE 31
IEFBR14 RMODE ANY
SR 15,15
BR 14
END IEFBR14
//SYSUT2 DD DISP=OLD,DSN=&SYSUID..COPYSTAT.PDS(IEFBR14) |
|
|
Back to top |
|
|
jerryte
Active User
Joined: 29 Oct 2010 Posts: 202 Location: Toronto, ON, Canada
|
|
|
|
The company I work for has StarTool so I can use the "ATTR ADDSTATS" command. We don't have a COPYSTAT program. Is this a vendor program? |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
jerryte wrote: |
... We don't have a COPYSTAT program. Is this a vendor program? |
No. It's just an idea I dreamed up. I have a proof of concept implementation, but it needs much more testing, something I'm not likely to do as I have no use for the concept. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Quote: |
I want to copy a SEQ dataset into a PDS member and then create statistics for the member. IEBCOPY or IEBGENER can do the copy but it doesn't generate the stats. |
I was working on FIND REPLACE with File Manager and came across the solution for your requirement.
If you have FILE MANAGER then you can copy sequential dataset to a PDS and create STATS.
From primary options menu --> 3 Utilities --> 3 Copy --> From SEQ dataset --> On the TO dataset panel you have an option
Code: |
Stats Option
2 1. Off
2. Force |
The Batch JCL
Code: |
//FILEMGR EXEC PGM=FMNMAIN
//SYSPRINT DD SYSOUT=*
//FMNTSPRT DD SYSOUT=*
//SYSTERM DD SYSOUT=*
//SYSIN DD *
$$FILEM SET HEADERPG=YES,PAD=OFF,NOTRUNC=NO
$$FILEM DSC DSNIN=DOGE.INPUT.DATASET,
$$FILEM PACK=ASIS,
$$FILEM STATS=FORCE,
$$FILEM DISP=OLD,
$$FILEM MEMOUT=MUCHDOGE,
$$FILEM DSNOUT=DOGE.OUTPUT.DATASET |
|
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2010 Location: USA
|
|
|
|
steve-myers wrote: |
I suspect Jerryte is thinking about something like this -
Code: |
//F EXEC PGM=COPYSTAT
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD *
IEFBR14 RSECT
IEFBR14 AMODE 31
IEFBR14 RMODE ANY
SR 15,15
BR 14
END IEFBR14
//SYSUT2 DD DISP=OLD,DSN=&SYSUID..COPYSTAT.PDS(IEFBR14) |
|
REXXTOOLS by Open Software Technologies has library functions to create such COPYSTAT as a piece of cake.
If somebody is interested I can convert my test version(s) into a working utility as pure REXX with Address REXXTOOL. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
Try something like this:
Code: |
//TB1 EXEC PGM=IKJEFT1B
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
StarTool 'xx.TEST.CF.SEQ.V200' +
copy 'xx.TEST.CF.PDS.V200(lifestry) repl
StarTool 'xx.TEST.CF.PDS.V200' attr lifestry addstats |
You could of course package those 2 Startool commands in to a REXX pgm. |
|
Back to top |
|
|
|