Thanks everyone,
I found that sometime I see DATACLAS=value and sometimes I would see
DATACLAS(value) so I made a couple of changes to allow VB input and FB
output, as well as choosing the DATACLAS format.

Here is what I ended up with using (retyped from my ISPF screen) .....

OPTION VLSCMP
RECORD TYPE=V
INCLUDE COND=(5,70,SS,EQ,C'DATACLAS')

INREC IFOUTLEN=21,
       IFTHEN=(WHEN=(5,70,SS,EQ,C'DATACLAS=',
           PARSE=(%01=(ENDBEFR=C'DATACLAS=',FIXLEN=8),
                           %02=(ENDBEFR=C',',FIXLEN=8)),
           BUILD=(1,4,5:%02,13:X'000000000000001C')),
       IFTHEN=(WHEN=(5,70,SS,EQ,C'DATACLAS(',
           PARSE=(%03=(ENDBEFR=C'DATACLAS(',FIXLEN=8),
                           %04=(ENDBEFR=C')',FIXLEN=8)),
           BUILD=(1,4,5:%04,13:X'000000000000001C'))

SORT FIELDS=(5,8,CH,A)
SUM FIELDS=(13,8,PD)

OUTFIL FNAMES=SORTOF01,CONVERT,OUTREC=(5,16)

END




On Thu, Aug 1, 2019 at 10:27 AM John McKown <[email protected]>
wrote:

> On Thu, Aug 1, 2019 at 8:43 AM John McKown <[email protected]>
> wrote:
>
> > On Thu, Aug 1, 2019 at 8:22 AM Cameron Conacher <[email protected]>
> > wrote:
> >
> >> Hello to the DFSORT folks.
> >> I have a file of data containing extracts from some JCL.
> >> Specifically, I am looking for all values of DATACLAS.
> >> This all relates back to Pervasive Encryption. I just want a quick
> report
> >> of the DATACLAS values in use today, as well as the counts for each
> >> DATACLAS item I find.
> >>
> >> I ran a quick compare to get a report from our JCL Library, and now I am
> >> building a SORT to look at the variable length input file data.
> >> I can use 'INCLUDE COND=(5,70,SS,EQ,C'DATACLAS=') to select a subset of
> >> records from the original compare report.
> >> I could take this file and play with it in ISPF EDIT to pull out the
> eight
> >> bytes following 'DATACLAS='.
> >> However, I am wondering if I can do this in DFSORT.
> >> So, if I have
> >>       DATACLAS=FRED,
> >> I would want to extract and summarize FRED and if I have
> >>        DATACLAS=POTATO I would want to extract and summarize POTATO
> >> I guess the question is how can I extract characters from the input
> >> records
> >> that appear following the SubString match?
> >>
> >> Thanks
> >>
> >>
> >
> > I am not a DFSORT expert. But I think that you'd be better off trying to
> > use PARSE.
> >
> https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.iceg200/rrwvf.htm
> >
> > OUTREC PARSE=(%01=(STARTAFT=C'DATACLAS=',ENDBEFR=C',')),
> >               BUILD=(%01)
> >
> >
> > I didn't include all the other SORT control cards.
> >
>
> Tough morning. Perhaps this would be better:
>
>   INCLUDE COND=(5,70,SS,EQ,C'DATACLAS=')
>   INREC PARSE=(%01=(STARTAFT=C'DATACLAS=',ENDBEFR=C',')),
>              BUILD=(%01,9:C' ')
>   SORT FIELDS=(1,8,CH,A)
>   SUM FIELDS=NONE
>
>
> The only thing which concerns me is whether the BUILD= is correct to make a
> fixed length output record.
>
>
>
>
>
> >
> > --
> > A sine curve goes off to infinity, or at least the end of the blackboard.
> > -- Prof. Steiner
> >
> > Maranatha! <><
> > John McKown
> >
>
>
> --
> A sine curve goes off to infinity, or at least the end of the blackboard.
> -- Prof. Steiner
>
> Maranatha! <><
> John McKown
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to