Reda, John wrote:
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:

I kinda' thought you would have that; now it's just
a matter if Eric is current in his release of SyncSort
(despite his documentation which is "about 6 years old").

You guys make your docs available for free on the Internet,
like IBM, right? Maybe you can give Eric a pointer.



  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.

Whoa, you're right. I was too quick to just copy over
Eric's job and change BUILD to OVERLAY. Good catch.


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.

On the other hand, having NOMATCH would hide the fact there
was something in error. Guess it comes down to his real
needs here.


*** 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.

I wasn't sure, in the original post, if Eric had allowed
for the RDW. In a later post he said he had, so 15 is the
value to use.



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.

303-393-8716
http://www.trainersfriend.com

  z/OS Application development made easier
    * Our classes include
       + How things work
       + Programming examples with realistic applications
       + Starter / skeleton code
       + Complete working programs
       + Useful utilities and subroutines
       + Tips and techniques

==> Check out the Trainer's Friend Store to purchase z/OS  <==
==> application developer toolkits. Sample code in four    <==
==> programming languages, JCL to Assemble or compile,     <==
==> bind and test.                                         <==
==>   http://www.trainersfriend.com/TTFStore/index.html    <==

----------------------------------------------------------------------
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

Reply via email to