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

Case issue when selecting records


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Oct 26, 2012 11:53 pm
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Oct 27, 2012 12:30 am
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

Moderator Emeritus


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

PostPosted: Sat Oct 27, 2012 12:43 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top