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
 
"FIELDS Box"

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Aug 01, 2014 10:10 pm    Post subject: "FIELDS Box"
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

Moderator


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

PostPosted: Fri Aug 08, 2014 6:18 pm    Post subject:
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

Active User


Joined: 29 Apr 2008
Posts: 189
Location: Maryland

PostPosted: Wed Oct 18, 2017 7:57 pm    Post subject:
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    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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am

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