MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

IDCAMS to SORT using REXX

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
Magesh_J
Intermediate


Joined: 21 Jun 2014
Posts: 259
Topics: 54

PostPosted: Thu Jul 13, 2017 11:26 am    Post subject: IDCAMS to SORT using REXX Reply with quote

Hi,

I am trying to create a tool, which will convert IDCAMS to SORT.

the goal is to convert all REPRO IDCAMS to SORT COPY

1. Identify the input dd names
2. identify the corresponding input dsn
3. based on the number of repro command in Sysin card, we need to generate the number of sort steps.
4. the REXX should modify the existing proc/JCL.
ex. if proc two IDCAMS steps copying ten datasets to other ten datasets + 3 COBOL program steps, then we need to modify the proc to have ten sort steps +3 Cobol program steps, also REXX should remove only IDCAMS REPRO steps and replace with sort steps, not any other steps.

Please advise, if this is possible, or do you foresee any challenges.

If it is possible, it would be great if you can give an idea/approach.

Thanks
Magesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12357
Topics: 75
Location: San Jose

PostPosted: Thu Jul 13, 2017 12:40 pm    Post subject: Re: IDCAMS to SORT using REXX Reply with quote

Magesh_J wrote:
Hi,

I am trying to create a tool, which will convert IDCAMS to SORT.



Sorry you truly cannot convert the IDCAMS statements to SORT. IDCAMS supports a plethora of other commands like (Allocate, Define, Alter,Dcollect, Print, Diagnose, Export, Import...)

So even if you narrow down to converting REPRO statements, there are still some more issues.

How are you going to handle?

Code:

FROMKEY('KEY')
FROMADDRESS('ADDRESS')
FROMNUMBER('NUMBER')
TOKEY('KEY')
TOADDRESS('ADDRESS')
TONUMBER('NUMBER')


IDCAMs knows about the VSAM dataset properties and works off the key lengths and offsets. If you want to convert, them you need to do a LISTCAT and get key lengths and Offsets which I think is re-inventing the wheel.

If you are REPRO'ing only VSAM datasets, then I would say leave it as is

Also how are you going to handle IFTHEN statements in IDCAMS?
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Magesh_J
Intermediate


Joined: 21 Jun 2014
Posts: 259
Topics: 54

PostPosted: Thu Jul 13, 2017 2:52 pm    Post subject: Reply with quote

Hi Kolusu,

Thanks for looking into this.

I am only interested in IDCAMS REPRO.

We can ignore FROMKEY ,FROMADDRESS, FROMNUMBER, TOKEY, TOADDRESS, TONUMBER

IFTHEN is coded we can have a comment stating IFTHEN Handled, needs to be addressed.

I hardly see IFTHEN used in REPRO.


We have to perform Listcat to check if it's a VSAM VB.

Kolusu wrote:

If you are REPRO'ing only VSAM datasets, then I would say leave it as is


I see significant elapsed time difference and marginal CPU difference with IDCAMS and SORT.

SORT could utilize more CPU when CPU is available when compared to IDCAMS.

Thanks
Magesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12357
Topics: 75
Location: San Jose

PostPosted: Thu Jul 13, 2017 6:07 pm    Post subject: Reply with quote

Magesh_J wrote:
Hi Kolusu,

Thanks for looking into this.

I am only interested in IDCAMS REPRO.
We can ignore FROMKEY ,FROMADDRESS, FROMNUMBER, TOKEY, TOADDRESS, TONUMBER

IFTHEN is coded we can have a comment stating IFTHEN Handled, needs to be addressed.

I hardly see IFTHEN used in REPRO.


I think you misunderstood. How would you handle something like this
Code:

  PRINT INFILE(SPLF1) CHARACTER COUNT(1)                   
  IF LASTCC=0 THEN DO                                       
     REPRO IFILE(XMITI) OFILE(XMITO) COUNT(1)               
     END                                                   
  ELSE IF LASTCC > 0 THEN DO                               
     DELETE 'HLQ.SLQ.TLQ'                                   
  END                     


Magesh_J wrote:

We have to perform Listcat to check if it's a VSAM VB.


VSAM clusters do NOT have RDW. So unless you have variable data and you are copying it to sequential file, it does not really matter to read the vsam cluster as V


Kolusu wrote:

If you are REPRO'ing only VSAM datasets, then I would say leave it as is


Magesh_J wrote:

I see significant elapsed time difference and marginal CPU difference with IDCAMS and SORT.

SORT could utilize more CPU when CPU is available when compared to IDCAMS.


Use the BUFNO parms on IDCAMS jobs and rerun the jobs as they probably using the default BUFNO of 5
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Magesh_J
Intermediate


Joined: 21 Jun 2014
Posts: 259
Topics: 54

PostPosted: Fri Jul 14, 2017 10:00 am    Post subject: Reply with quote

Kolusu wrote:

Use the BUFNO parms on IDCAMS jobs and rerun the jobs as they probably using the default BUFNO of 5


We use Veloci Raptor software, which will take care of index buffer and databuffer allocation if a vsam dataset is used.

Quote:

VSAM clusters do NOT have RDW. So unless you have variable data and you are copying it to sequential file, it does not really matter to read the vsam cluster as V


yes, most of our repro job copies file from VSAM to sequential DASD/TAPE, so we need to see if it is a variable file are not.

Please advise if my understanding is correct

    VSAM to VSAM ==> Specify only OPTION COPY
    VSAM to PS ==> Sepcify Record type=V along with OPTION COPY if avg recl and max recl are different
    VSAM to PS ==> Specify only OPTION COPY if avg and max recl is same
    PS to PS ==> Specify OPTION COPY
    VB PS TO VSAM ==> Specify OPTION COPY only
    FB PS TO VSAM ==> Specify OPTION COPY only


Thanks
Magesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12357
Topics: 75
Location: San Jose

PostPosted: Fri Jul 14, 2017 11:54 am    Post subject: Reply with quote

Magesh_J wrote:

yes, most of our repro job copies file from VSAM to sequential DASD/TAPE, so we need to see if it is a variable file are not.

Please advise if my understanding is correct

    VSAM to VSAM ==> Specify only OPTION COPY
    VSAM to PS ==> Sepcify Record type=V along with OPTION COPY if avg recl and max recl are different
    VSAM to PS ==> Specify only OPTION COPY if avg and max recl is same
    PS to PS ==> Specify OPTION COPY
    VB PS TO VSAM ==> Specify OPTION COPY only
    FB PS TO VSAM ==> Specify OPTION COPY only


Magesh


The above look ok. Just keep in mind to parse COUNT and SKIP parms which translate to STOPAFT and SKIPREC.

Also keep in mind when copying into VSAM clusters you need to have the parm REUSE and the SORT equivalent parm VSAMEMT=YES to copy into an empty vsam file.
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group