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

"FIELDS Box"


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

Moderator Emeritus


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

PostPosted: Fri Aug 01, 2014 10:10 pm
Reply with quote

As can be seen from the following, BUILD is nearly 10 years old.

BUILD is an alias of FIELDS (means it is another name for it, so operation is identical).

FIELDS is used in many places, and has more than one meaning. There is no need to confuse the use of FIELDS more by using it on INREC, OUTREC and to use OUTREC on OUTFIL when it has a perfectly reasonable alternative.

BUILD has only one meaning, and is used on INREC, OUTREC, OUTFIL and within IFTHEN on the same.

FIELDS will always exists, as it has since, as far as I know, the first release of IBM's first Mainframe SORT product.

However, let's not use it in sample code.

First infraction will be incur a small currency penalty to be paid into the "FIELDS Box" (if you know how a "Swear Box" works, this should be easy).

People who continue to use FIELDS will be forced to perform a series of simple joins using SPLICE instead of JOINKEYS, and further transgressions will lead to their WHEN=GROUP License revoked.

Note:
BUILD has also been available in SyncSort for many years, so the FIELDS Box applies to SyncSort as well.

Quote:
Summary of Changes for SC26-7523-01 z/OS Version 1 Release 6
(PTFs - December, 2004)

[...]

OUTFIL Enhancements

[...]

BUILD or OUTREC: The existing OUTREC parameter, or its new alias of BUILD,
allows you to reformat each record by specifying all of its items one by one.
BUILD or OUTREC gives you complete control over the items you want in your
reformatted OUTFIL records and the order in which they appear. You can delete,
rearrange and insert fields and constants.

[...]

INREC and OUTREC Enhancements
[...]

BUILD or FIELDS: The existing FIELDS parameter, or its new alias of BUILD,
allows you to reformat each record by specifying all of its items one by one.
BUILD or FIELDS gives you complete control over the items you want in your
reformatted INREC or OUTREC records and the order in which they appear.
You can delete, rearrange and insert fields and constants.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Aug 08, 2014 6:18 pm
Reply with quote

Good explanation Bill icon_smile.gif Thanks - It should be on sticky?
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Wed Oct 18, 2017 7:57 pm
Reply with quote

One more note:
SORT statements and parameters are used/applied/executed in the order defined by the utility logic;
the sequence of their execution doesn't depend on the order the statements appear under //SYSIN DD
1) BUILD from INREC
2) BUILD from OUTREC
3) BUILD from each of OUTFIL
Any of BUILD uses as its input the record format received from previous BUILD:
All OUTFIL BUILDs use the format defined by OUTREC BUILD, or by INREC BUILD, or they use the original/joined record format.
Code:
. . .
 [ INREC BUILD=(...) ]          - reformat the record just before SORT operation
 SORT FIELDS=...
 [ OUTREC BUILD=(...) ]         - common reformat after SORT operation for all output datasets
 [ OUTFIL FNAMES=(...),BUILD=(...) ]   - extra reformat for different output datasets
 [ OUTFIL FNAMES=(...),BUILD=(...) ]   - extra reformat for different output datasets
 [ OUTFIL FNAMES=(...),BUILD=(...) ]   - extra reformat for different output datasets
 END
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 PuTTY - "User is not a surrogate... IBM Tools 5
No new posts Newbie Stuck on "Duplicate Datas... TSO/ISPF 5
No new posts RABBIT HOLE NEEDED - "Live"... All Other Mainframe Topics 0
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts Using PARM=('JPn"&SYMBOL&quo... DFSORT/ICETOOL 2
Search our Forums:

Back to Top