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
 
copy SEQ to PDS and create stats

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
jerryte

Active User


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

PostPosted: Thu Apr 27, 2017 1:15 am    Post subject: copy SEQ to PDS and create stats
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 User


Joined: 01 Sep 2015
Posts: 175
Location: Switzerland

PostPosted: Thu Apr 27, 2017 1:52 pm    Post subject:
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: 586
Location: The Universe

PostPosted: Fri Apr 28, 2017 7:51 am    Post subject:
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: 187
Location: Toronto, ON, Canada

PostPosted: Fri Apr 28, 2017 9:56 pm    Post subject:
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: 586
Location: The Universe

PostPosted: Fri Apr 28, 2017 10:44 pm    Post subject:
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: 1532
Location: Chennai

PostPosted: Mon May 01, 2017 11:47 pm    Post subject:
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

Active User


Joined: 29 Apr 2008
Posts: 214
Location: Maryland

PostPosted: Fri Jul 07, 2017 4:04 am    Post subject:
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 User


Joined: 01 Sep 2015
Posts: 175
Location: Switzerland

PostPosted: Fri Jul 07, 2017 7:49 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to create issuer certificate? :'( vasanthz All Other Mainframe Topics 1 Sat Nov 18, 2017 5:14 am
No new posts Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm

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