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

Changing sort Card Dynamically


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

New User


Joined: 10 Jun 2015
Posts: 51
Location: India

PostPosted: Sat Aug 19, 2017 2:33 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Senior Moderator


Joined: 14 Mar 2007
Posts: 10714
Location: italy

PostPosted: Sat Aug 19, 2017 2:43 pm
Reply with quote

probably JOINKEY is the right way to do it
lots of examples around
Back to top
View user's profile Send private message
vickey_dw

New User


Joined: 10 Jun 2015
Posts: 51
Location: India

PostPosted: Mon Aug 21, 2017 12:05 am
Reply with quote

Hi Enrico
It will be very helpful if you can guide how this can be achieved using joinkey?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2453
Location: Hampshire, UK

PostPosted: Mon Aug 21, 2017 3:24 pm
Reply with quote

If your first three characters are always the same then why not just select on those?
Back to top
View user's profile Send private message
magesh23586

Active User


Joined: 06 Jul 2009
Posts: 213
Location: Chennai

PostPosted: Mon Aug 21, 2017 8:50 pm
Reply with quote

give us a sample input of both the files to suggest.
Back to top
View user's profile Send private message
sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 932
Location: Maryland

PostPosted: Wed Aug 23, 2017 9:57 pm
Reply with quote

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
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

 


Similar Topics
Topic Forum Replies
No new posts Very Large Sort failed - Seeking reco... DFSORT/ICETOOL 7
No new posts Date conversion using SORT SYNCSORT 4
No new posts Which SORT utility can improve the Pe... DFSORT/ICETOOL 16
No new posts Using sort on VB records based on off... DFSORT/ICETOOL 6
No new posts Dynamically switching terminal model TSO/ISPF 9
Search our Forums:

Back to Top