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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
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: 2455
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

Senior Member


Joined: 29 Apr 2008
Posts: 2010
Location: USA

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 JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top