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

compare CH - no case sensitive


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

New User


Joined: 04 Mar 2009
Posts: 5
Location: Warsaw

PostPosted: Mon Apr 27, 2009 8:54 pm
Reply with quote

Hi,

Is it possible to set include condition for CH field without case sensitivity? Requirement is also not to change data during records filtering in SORT.

I'll tried to do this with using INREC, but I registered that INCLUDE is executed before INREC clause. INREC also changed my output data...
I have no idea how to do this and of course I do not know if such comparission is even possible.

Let's following example show what i need:

As a source I have dataset:
Abcdef
aBcdef
Bvsdjh
ABCrrr
sdhjhfu
abcKDJ

My "incorrect" sort condition is:
INCLUDE COND=(1,3,CH,EQ,C'ABC')

As an output I want get something like this:
Abcdef
aBcdef
ABCrrr
abcKDJ
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Apr 27, 2009 9:33 pm
Reply with quote

Here are two different ways to do this with DFSORT:

Using ALTSEQ and AQ

Code:

//S1   EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
Abcdef
aBcdef
Bvsdjh
ABCrrr
sdhjhfu
abcKDJ
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  ALTSEQ CODE=(81C1,82C2,83C3)
  OUTFIL INCLUDE=(1,3,AQ,EQ,C'ABC')
/*


Using TRAN=LTOU

Code:

//S2    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
Abcdef
aBcdef
Bvsdjh
ABCrrr
sdhjhfu
abcKDJ
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  INREC OVERLAY=(81:1,3,TRAN=LTOU)
  OUTFIL INCLUDE=(81,3,CH,EQ,C'ABC'),BUILD=(1,80)
/*
Back to top
View user's profile Send private message
cieron

New User


Joined: 04 Mar 2009
Posts: 5
Location: Warsaw

PostPosted: Tue Apr 28, 2009 2:48 pm
Reply with quote

Frank You are great !! Thanks.

The second way is more useful and flexible. I can use also SS in include conditions.
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 Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Compare two files with a key and writ... SYNCSORT 3
No new posts Compare latest 2 rows of a table usin... DB2 1
Search our Forums:

Back to Top