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

Compare flat with vsam file using DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Nov 06, 2013 4:08 pm
Reply with quote

You can avoid the tortuous OMIT=(...NE...) by instead using INCLUDE=(...EQ...).
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Nov 06, 2013 10:54 pm
Reply with quote

magesh23586,

Code:

//JNF2CNTL DD *                                               
 OMIT COND=(454,1,CH,NE,C'N')                        ==>changed         
 OPTION DYNALLOC(,16),FILSZ=E5000000,AVGRLEN=450     


The DYNALLOC and FILSZ and AVGRLEN are ignored as you used SORTED keyword which makes Joinkeys read the VSAM file with a COPY operation. Remove them. I am not even sure as to why you need to read the VSAM Cluster as Variable when your key is always present and you don't need any other data. Read it TYPE=F and adjust the positions on the JOINKEYS accordingly. Since you don't need any data apart from the key, Just use INREC BUILD=(1,12) in JNFxCNTL which will only build the Key to match. Your INCLUDE condition gets executed before the INREC.

As Bill Mentioned always code for Positive condition rather than negative condition.
Back to top
View user's profile Send private message
magesh23586

Active User


Joined: 06 Jul 2009
Posts: 213
Location: Chennai

PostPosted: Thu Nov 07, 2013 6:12 pm
Reply with quote

SKolusu,

This is Fantastic and awesome, CPU time further reduced to .25 previously .28

Thankyou very much... The fix given by you is worked like a charm.

I can now boldly challenge with my clients icon_biggrin.gif icon_biggrin.gif icon_biggrin.gif

Code:

* CONTROL STATEMENTS FOR JOINKEYS APPLICATION                 
  JOINKEYS FILE=F1,FIELDS=(3,1,A,5,2,A,8,4,A,13,5,A)         
  JOINKEYS FILE=F2,FIELDS=(1,1,A,2,2,A,4,4,A,8,5,A),SORTED,   
           TYPE=F,NOSEQCK                                     
  REFORMAT FIELDS=(F1:1,1354)                                 
* CONTROL STATEMENTS FOR MAIN TASK (JOINED RECORDS)           
  SORT FIELDS=COPY                                           
//JNF2CNTL DD *                                               
 INCLUDE COND=(450,1,CH,NE,C'N')                             
 INREC BUILD=(1,12)                                           
/*                                                           
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Nov 07, 2013 6:43 pm
Reply with quote

For a comparison, why don't you use OPTION COPY/SORT FIELDS=COPY to copy your KSDS to a "flat" file. Then run your step with that flat file. As well as CPU, pay attention to the I-O counts, VSAM vs flat.

Remember, if the number of records you are processing is "small" in relation to the size of the KSDS, your client is not going to be impressed vs a programming language with a direct read.
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 -> DFSORT/ICETOOL Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top