Steve/Eric, CHANGE has been around for a while but OVERLAY was introduced in release 1.3. Steve's control cards were real close, I think these will work for you:
SORT FIELDS=COPY OUTREC OVERLAY=(15:15,4, CHANGE=(4,C'CSYS',C'ESYS', C'DSYS',C'FSYS', C'FSYS',C'FSYS'),NOMATCH=(15,4)) The thing that was required was the column designation. Without it, the output of the CHANGE would be placed in the column 1. By putting in the "15:" you are directing the output to be put in column 15. This will leave the RDW alone. You many also want to consider using the NOMATCH subparameter. This tells OUTREC what to do if column 15 is not either CSYS, DSYS or FSYS. If something other than these 3 values is found, the sort would end with RC=16. NOMATCH will let the execution continue leaving the original value in the field. SMF data is notoriously dirty so it would not surprise me for you to have an unexpected value in at least one of your fields. *** NOTE *** Eric's original cards pointed to column 15 while Steve's used column 19. Please make sure you are using the correct column. I used 15 in my example to match Eric's. If this doesn't work, let me know and I will work with you. John Reda Syncsort, Inc. -----Original Message----- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Steve Comstock Sent: Wednesday, February 04, 2009 6:26 PM To: IBM-MAIN@bama.ua.edu Subject: Re: Copy SMF Records With Syncsort Eric Bielefeld wrote: > I'm trying to fix some SMF records from our TEST Lpars that have the wrong > SMFID in them. I'm pretty sure I can fix them with Syncsort using the OUTREC > Change command, but I'm not sure how to do that. I haven't worked with > Syncsort that much, and I've spent the last hour or so trying to figure out > what I need. I figure there's someone out there that can do this off the top > of their head quickly. > > This is what I have so far: > > OUTREC FIELDS=(15,4, > CHANGE=(4,C'CSYS',C'ESYS', > C'DSYS',C'FSYS', > C'FSYS',C'FSYS')) > SORT FIELDS=COPY > > I'm sure there is a few things missing. I get a message: > > WER108I SORTIN : RECFM=VBS ; LRECL= 32756; BLKSIZE= 27990 > WER235A OUTREC RDW NOT INCLUDED > > I'd appreciate any help. Thanks. > > Eric > > -- > Eric Bielefeld > Systems Programmer > Washington University > St Louis, Missouri > 314-935-3418 Eric, I've been spending a lot of time developing a DFSORT/ICETOOL class, which I hope to announce next week. Although DFSORT is not SyncSort, I imagine they are the same for this case. OUTREC FIELDS=(15,4, CHANGE=(4,C'CSYS',C'ESYS', C'DSYS',C'FSYS', C'FSYS',C'FSYS')) SORT FIELDS=COPY This will copy from your SORTIN data set; the output data set will just be the four bytes ESYS, or FSYS. You want to OVERLAY the field; since the input records are variable, you must also allow for a 4 byte RDW in your positioning. Try this: SORT FIELDS=COPY OUTREC OVERLAY=(19,4, CHANGE=(4,C'CSYS',C'ESYS', C'DSYS',C'FSYS', C'FSYS',C'FSYS')) Kind regards, -Steve Comstock The Trainer's Friend, Inc. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html