You can code INREC and INCLUDE/OMIT COND in any order you like. It does not matter. SORT is going to execute them in the order it wants, which is always INCLUDE/OMIT COND first, then INREC.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
INCLUDE/OMIT COND operates before INREC. Did the implications of that sink in?
You need to consult your SyncSORT (as it turns out) documentation to see if you can get a date format in INCLUDE/OMIT COND which matches your data format.
If not, I'd suggest a simple small step to set up the date in the format you need, as a SORT symbol, using SYMNAMES and then use that symbol by name in your INCLUDE COND=.
Read the piece about FIELDS. Don't use FIELDS on INREC, OUTREC or OUTREC on OUTFIL.
You don't need the OUTREC anyway. The "FIELDS" on your INREC (which is not needed because it does not do what you think/want) would be better OVERLAY just for the data you want changed (and don't you want to change it back afterwards?).
****** ***************************** Top of Data *
000001 XXXXXXXXXX08/19/2014
000002 XXXXXXXXXX08/19/2014
****** **************************** Bottom of Data
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Yes, it'll work. However, every record is processed (due to need of OUTFIL INCLUDE=) and every record is extended to include a constant value. The more records on the file, the more noticeable the effects of this. To go this route I'd try to INCLUDE COND= at least something (like the YYYY value).
If not directly available in that format for INCLUDE COND=, set up a sort symbol on SYMNAMES. Generate in one small step, use (along with SYMNOUNT) in the second step, on the INCLUDE COND=.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Yep, like that. I'd just include the SYMNOUT DD in the second step as well, but not vital where there is only one symbol (the value it has can readily be worked out from the converted control cards - the SYMNOUT makes it explicit).
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
Thanks Bill. I have not much experience of using symbols. Mostly because at my site, if a SORT is doing more than 'sorting' they make me write a program for it.