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

Sorting based on selected strings


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

New User


Joined: 02 Aug 2007
Posts: 83
Location: Here

PostPosted: Thu Jan 05, 2012 4:36 pm
Reply with quote

Hi Enrico,

Thanks a million - this is what i was looking for. I will try this and let you know.

Thanks a ton again icon_smile.gif
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: Thu Jan 05, 2012 4:57 pm
Reply with quote

Since CJT is now happy, and all these might move anyway:

Code:

  SORT FIELDS=(22,3,CH,A),EQUALS                                         
  INREC IFTHEN=(WHEN=(12,2,CH,GE,C'AB',AND,12,2,CH,LE,C'AF'),OVERLAY=(22*
              :10,2,X)),IFTHEN=(WHEN=NONE,OVERLAY=(22:10,2,13,1))     
  OUTREC BUILD=(1,21)                                                   


This is the output from the symbol substitution.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Thu Jan 05, 2012 6:26 pm
Reply with quote

enrico-sorichetti wrote:
Quote:
And how about :

//SYMNOUT DD SYSOUT=*


that was already counted in the two...
//SYMNAMES ==>1
//SYMNOUT ==> 2
icon_biggrin.gif

Quote:
SORT FIELDS=(FLD1,A,FLD2,A)

tells me nothing about field characteristics, now i have to browse another
dataset for the SYMNAMES definition. A waste of time.


You just started a religion war icon_wink.gif
SYMNOUT is optional, BTW, so use of symbols only requires you to add one DD statement to the job.
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: Fri Jan 06, 2012 12:03 am
Reply with quote

Quote:
SORT FIELDS=(FLD1,A,FLD2,A)

tells me nothing about field characteristics, now i have to browse another
dataset for the SYMNAMES definition. A waste of time.


It's NOT a waste of time when you consider that DFSORT Symbols allows you to stop worrying about the field characteristics. You just set the symbols up once in your SYMNAMES data set and forget about them until you need to change something. Then you go back to your SYMNAMES definition file and change it appropriately. As an example (if you use * for the fields), this makes it very easy to insert a new field between two existing fields without having to change all of the positions in your control statements.

If you want to know the field characteristics for some reason, you can look at the SYMNAMES definition data set, or run the job and look at SYMNOUT or the transformed statements in //SYSOUT.

Having a separate data set for the SYMNAMES definitions is very similar to what you do for most high level languages such as C, COBOL, etc. Are you suggesting that symbols SHOULD NOT be used for those languages either? I don't really see the difference between using Symbols for DFSORT and using Symbols for HLLs (which almost everyone would agree is a better way to go).
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Fri Jan 06, 2012 12:58 am
Reply with quote

When a file layout changes, you usually have to chase down every sort control card used to process that file and make sure that you make the necessary adjustments to the hard-coded field positions. I have seen production jobs crash and burn because someone forgot to update a sort card. It's usually not the sort step that abends, but rather a downstream step that is now seeing the data in an unexpected sequence.

Symbols greatly mitigate that risk.
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: Fri Jan 06, 2012 1:43 am
Reply with quote

Quote:
Symbols greatly mitigate that risk.


Exactly. That's why I added Symbols for DFSORT/ICETOOL.
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: Fri Jan 06, 2012 1:49 am
Reply with quote

Hello,

Quote:
You just set the symbols up once in your SYMNAMES data set and forget about them until you need to change something.
And you can use lots of the same names people are already familiar/comfortable with from writing code or queries. . .

Quote:
Symbols greatly mitigate that risk.
Yup, Just like using the Copybook rather than some custom/program-specific file definition. . .

Of course, there is the issue of so many organizations that believe any change or new feature is bad. . . icon_rolleyes.gif
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 Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
No new posts To search DB2 table based on Conditio... DB2 1
This topic is locked: you cannot edit posts or make replies. Merge 2 input files based on the reco... JCL & VSAM 2
No new posts Split large FB file based on Key coun... DFSORT/ICETOOL 4
No new posts Mass JCL release via IDZ tool(eclipse... CA Products 1
Search our Forums:

Back to Top