View previous topic :: View next topic
|
Author |
Message |
vickey_dw
New User
Joined: 10 Jun 2015 Posts: 51 Location: India
|
|
|
|
Hi All,
I have one input file(LRECl 80) from which i have to fetch data based on below condition
Code: |
Sort fields=copy
INCLUDE COND=(1,4,CH,EQ,C'ABC1',OR,1,4,CH,EQ,C'ABC0') |
But problem is these securities(4 bytes example ABC1,ABC0) are received dynamically in below format
Code: |
ABC1
ABC0
ABC9
.
.
. |
So i need to change my INCLUDE COND sort card dynamically based on number of securities received.
Appreciate if you can guide me in achieving this. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
probably JOINKEY is the right way to do it
lots of examples around |
|
Back to top |
|
|
vickey_dw
New User
Joined: 10 Jun 2015 Posts: 51 Location: India
|
|
|
|
Hi Enrico
It will be very helpful if you can guide how this can be achieved using joinkey? |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
If your first three characters are always the same then why not just select on those? |
|
Back to top |
|
|
magesh23586
Active User
Joined: 06 Jul 2009 Posts: 213 Location: Chennai
|
|
|
|
give us a sample input of both the files to suggest. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2010 Location: USA
|
|
|
|
vickey_dw wrote: |
Hi Enrico
It will be very helpful if you can guide how this can be achieved using joinkey? |
Code: |
JOINKEYS F1=MASTER,FIELDS=(1,4,A) master file to select records from
JOINKEYS F2=SELECTOR,FIELDS=(1,4,A) selection file with allowed keys
REFORMAT FIELDS=(F1:1,nnn) choose only MASTER part
....
END |
|
|
Back to top |
|
|
|