Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Case issue when selecting records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Fri Oct 26, 2012 11:16 pm    Post subject: Case issue when selecting records
Reply with quote

I am selecting against a FB/3051 dataset using DFSORT. When I select records with JOHNSON somewhere in positions 141-340, I get 4 records.

Code:

   SORT FIELDS=COPY                       
   INCLUDE COND=(141,200,SS,EQ,C'JOHNSON')


When I select records with Johnson somewhere in positions 141-340, I get 247 records.

Code:

   SORT FIELDS=COPY                       
   INCLUDE COND=(141,200,SS,EQ,C'Johnson')


Are there any parameters I can use with DFSORT, so if I select JOHNSON, I will select all Johnsons from the file, regardless of case?
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Oct 26, 2012 11:53 pm    Post subject: Reply to: Case issue when selecting records
Reply with quote

You could use an OR on your INCLUDE. It won't get you "JoHnson" unless you code for that as well.

There is TRAN. With TRAN you can covert a field in various ways, including UTOL (upper to lower) and LTOU (lower to upper). This would deal with all possible "mangled-case" versions of Johnson.

Of course, you may not want to do that to your actual field, so you can "extend" your record by appending 141,200 at column 3052 with OVERLAY, doing the TRAN while you are at it, then INCLUDE with the all-upper or all-lower (your choice) on the exteded field, and drop the appended data before writing out, INREC BUILD=(1,3051) for instance.
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Sat Oct 27, 2012 12:15 am    Post subject: Reply to: Case issue when selecting records
Reply with quote

Thank you very much. I didn't want the field changed on the output. I just wanted to select all records with Johnson, regardless of case. DFSORT should probably have a prefix or keywork parameter to accomplish this.

I will probably switch the utility to FILEAID that can select upper and lower case by simply inserting a 'T' prefix.

$$DD01 COPY IF=(141,200,T'Johnson')
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Sat Oct 27, 2012 12:30 am    Post subject: Reply to: Case issue when selecting records
Reply with quote

Well, I've outlined how to do it without changing the output record :-)

I'm sure Kolusu will take your suggestion on board, and he will probably suggest a better way to do what you want than I have.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Oct 27, 2012 12:43 am    Post subject:
Reply with quote

Hello,

Quote:
I didn't want the field changed on the output.
Just to re-iterate what Bill said.

If you do as suggested, the selection will be as you want, but the output will have the original values - unchanged.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts RFE: DB2 support for mixed case names. Pedro DB2 0 Tue Jul 04, 2017 1:32 am
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us