|
View previous topic :: View next topic
|
| Author |
Message |
elixir1986
New User
Joined: 10 Nov 2015 Posts: 45 Location: USA
|
|
|
|
I am converting file matching functionality in Easytrieve to an equivalent DFSORT with JOINKEYS.
Reference used - IBM DFSORT Tuning Guide - www-40.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R3sc236882/$file/icet100_v2r3.pdf
I converted the input signed Packed Decimal(PD) to unsigned packed decimal in DFSORT JOINKEYS step with "INREC OVERLAY".
Inputs are sorted. I have included "SORTED,NOSEQCK" commands in the SYSIN for the SORT.
Along with that I have also used HIPRMAX=0,DSPSIZE=MAX, and MOSIZE=MAX.
The DFSORT is taking about 4 CPU seconds more that Easytrieve.
| Quote: |
| Is there any additional steps I can take to ensure improvement in the CPU time consumption? |
Let me know if any additional information is needed.
| Code: |
OPTION HIPRMAX=0,DSPSIZE=MAX,MOSIZE=MAX
SORT FIELDS=COPY
JOINKEYS FILE=XXX1,FIELDS=(80,8,A),SORTED,NOSEQCK
JOINKEYS FILE=XXX2,FIELDS=(80,8,A),SORTED,NOSEQCK
REFORMAT FIELDS=(F2:1,38,F1:6,5)
INREC OVERLAY=(80,08,PD,TO=PDF,88:08,PD,TO=PDF)
|
|
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1430 Location: Bamberg, Germany
|
|
|
|
| Try
|
|
| Back to top |
|
 |
elixir1986
New User
Joined: 10 Nov 2015 Posts: 45 Location: USA
|
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1430 Location: Bamberg, Germany
|
|
|
|
And difference in consumption / runtime is at your specific setup?
Maybe a non-JOINKEYS variant could also help to speed up things. |
|
| Back to top |
|
 |
elixir1986
New User
Joined: 10 Nov 2015 Posts: 45 Location: USA
|
|
|
|
No difference whatsoever.
Non Joinkeys variant in Sort? Or like using cobol? I’m not familiar with former. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2272 Location: USA
|
|
|
|
| elixir1986 wrote: |
I converted the input signed Packed Decimal(PD) to unsigned packed decimal in DFSORT JOINKEYS step with "INREC OVERLAY".
Let me know if any additional information is needed.
| Code: |
OPTION HIPRMAX=0,DSPSIZE=MAX,MOSIZE=MAX
SORT FIELDS=COPY
JOINKEYS FILE=XXX1,FIELDS=(80,8,A),SORTED,NOSEQCK
JOINKEYS FILE=XXX2,FIELDS=(80,8,A),SORTED,NOSEQCK
REFORMAT FIELDS=(F2:1,38,F1:6,5)
INREC OVERLAY=(80,08,PD,TO=PDF,88:08,PD,TO=PDF)
|
|
1. The syntax of INREC OVERLAY=… seems to result in “Syntax Error”, isn’t it?
2. The statement REFORMAT is executed before INREC.
(Output from REFORMAT is used as input to INREC)
So, the result of REFORMAT is 38+5=43 bytes.
If so, it is not clear: what should be converted by INREC OVERLAY at positions 80, and 88? |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3109 Location: NYC,USA
|
|
|
|
How many records are processed?
Btw,You can use an INREC statement in
JNF1CNTL and/or JNF2CNTL to normalize the keys for the F1 file and/or F2. |
|
| Back to top |
|
 |
elixir1986
New User
Joined: 10 Nov 2015 Posts: 45 Location: USA
|
|
|
|
| Rohit Umarjikar wrote: |
How many records are processed?
Btw,You can use an INREC statement in
JNF1CNTL and/or JNF2CNTL to normalize the keys for the F1 file and/or F2. |
Approximate record counts
SORTJNF1 - 70 Million
SORTJNF2 - 20 Million
SORTOUT - 20 Million
All the records(matching keys) from SORTJNF2 are present in SORTJNF1. From the previous Production Easytrieve run logs, I see this has been the case as well.
I have tried using INREC OVERLAY=(80,08,PD,TO=PDF,88:08,PD,TO=PDF) in JNF1CNTL but still no improvement in the CPU performance. |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1430 Location: Bamberg, Germany
|
|
|
|
| Since you are using REFORMAT, I would go with Rohit and reduce the amount of data in INREC of JNF1CNTL and JNF2CNTL. |
|
| Back to top |
|
 |
elixir1986
New User
Joined: 10 Nov 2015 Posts: 45 Location: USA
|
|
|
|
How do I reduce the amount of data? I get that from a feed.
Did you mean splitting file corresponding to SORTJNF1? |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1430 Location: Bamberg, Germany
|
|
|
|
| Basically you need to rebuild (or reduce) the records into Key (80,8) for each, plus F2:1,38 in JNF2CNTL and F1:6,5 in JNF1CNTL. You have to adjust the JOINKEYS FIELDS for this, and conversion to format PDF can be done once join processing has completed. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2272 Location: USA
|
|
|
|
I did not receive any response to my previous questions… There are obvious errors which nobody takes care about.
Now I can suggest: in both //JFN1CNTL and //JFN2CNTL to truncate records in INREC to only those fields needed for subsequent JOINKEYS, and REFORMAT.
It can significantly reduce the total size of data to be processed, and potentially speed-up the whole process. |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3109 Location: NYC,USA
|
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2272 Location: USA
|
|
|
|
| elixir1986 wrote: |
I converted the input signed Packed Decimal(PD) to unsigned packed decimal in DFSORT JOINKEYS step with "INREC OVERLAY".
Let me know if any additional information is needed.
| Code: |
OPTION HIPRMAX=0,DSPSIZE=MAX,MOSIZE=MAX
SORT FIELDS=COPY
JOINKEYS FILE=XXX1,FIELDS=(80,8,A),SORTED,NOSEQCK
JOINKEYS FILE=XXX2,FIELDS=(80,8,A),SORTED,NOSEQCK
REFORMAT FIELDS=(F2:1,38,F1:6,5)
INREC OVERLAY=(80,08,PD,TO=PDF,88:08,PD,TO=PDF)
|
|
One more time:
| Code: |
. . . . . . . .
INREC OVERLAY=(80,08,PD,TO=PDF,88:08,PD,TO=PDF)
*
INREC STATEMENT : SYNTAX ERROR
|
Next step: REFORMAT FIELDS=(F2:1,38,F1:6,5)
will produce the record of 38+5=43 bytes.
This 43-bytes records is passed to INREC OVERLAY=(80,08,PD,TO=PDF,88:08,PD,TO=PDF)
which definitely will give the error like this one: "position specified is out of the record field", because both positions 80, and 88 are greater than 43. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2272 Location: USA
|
|
|
|
My suggestion is
| Code: |
//SYSIN DD *
OPTION HIPRMAX=0,DSPSIZE=MAX,MOSIZE=MAX
JOINKEYS FILE=XXX1,FIELDS=(1,8,A),SORTED,NOSEQCK
JOINKEYS FILE=XXX2,FIELDS=(1,8,A),SORTED,NOSEQCK
REFORMAT FIELDS=(F2:9,38,F1:9,5)
SORT FIELDS=COPY
//*
//JFN1CNTL DD *
INREC BUILD=(80,8,PD,TO=PDF,LENGTH=8,
6,5)
//*
//JFN2CNTL DD *
INREC BUILD=(80,8,PD,TO=PDF,LENGTH=8,
1,38)
//*
|
Also remains unclear: why to convert PD to PDF? This field is not used in the final output record?........ |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|