Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 7314

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

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 Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts CICS-MQ connection setup issue kaushikv CICS 3 Wed Mar 21, 2018 8:10 pm
No new posts Need Help!!CEE library issue while br... kaushikv CICS 9 Fri Mar 09, 2018 6:06 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us