Posted: Thu Jul 13, 2017 11:26 am Post subject: IDCAMS to SORT using REXX
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.
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Thu Jul 13, 2017 12:40 pm Post subject: Re: IDCAMS to SORT using REXX
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.
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
www.linkedin.com/in/kolusu
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Thu Jul 13, 2017 6:07 pm Post subject:
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
www.linkedin.com/in/kolusu
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
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Fri Jul 14, 2017 11:54 am Post subject:
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
www.linkedin.com/in/kolusu
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