IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

copy SEQ to PDS and create stats


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 202
Location: Toronto, ON, Canada

PostPosted: Thu Apr 27, 2017 1:15 am
Reply with 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 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
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Thu Apr 27, 2017 1:52 pm
Reply with quote

PDS86 from CBTTAPE.ORG. The command ATTR ADDSTATS does exactly that.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Fri Apr 28, 2017 7:51 am
Reply with quote

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
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 202
Location: Toronto, ON, Canada

PostPosted: Fri Apr 28, 2017 9:56 pm
Reply with quote

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
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Fri Apr 28, 2017 10:44 pm
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Mon May 01, 2017 11:47 pm
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2010
Location: USA

PostPosted: Fri Jul 07, 2017 4:04 am
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Fri Jul 07, 2017 7:49 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts DB2 Table - Image copy unload IBM Tools 2
Search our Forums:

Back to Top