|
View previous topic :: View next topic
|
| Author |
Message |
CJT
New User
Joined: 02 Aug 2007 Posts: 83 Location: Here
|
|
|
|
Hi Enrico,
Thanks a million - this is what i was looking for. I will try this and let you know.
Thanks a ton again  |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
 |
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 767 Location: Whitby, ON, Canada
|
|
|
|
| enrico-sorichetti wrote: |
| Quote: |
And how about :
//SYMNOUT DD SYSOUT=*
|
that was already counted in the two...
//SYMNAMES ==>1
//SYMNOUT ==> 2
| 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  |
SYMNOUT is optional, BTW, so use of symbols only requires you to add one DD statement to the job. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
| 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 |
|
 |
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 767 Location: Whitby, ON, Canada
|
|
|
|
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 |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
| Quote: |
| Symbols greatly mitigate that risk. |
Exactly. That's why I added Symbols for DFSORT/ICETOOL. |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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. . .  |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|