Here is the error when I only use one IFTHEN:

            INREC IFOUTLEN=245,

                  IFTHEN=(WHEN=(1,14,CH,EQ,C'C'>CUST MASTER$,'),

                     PARSE=(%01=(ABSPOS=15,ENDBEFR=C'(',FIXLEN=50))),

                                                                   $

ICE107A 6 DUPLICATE, CONFLICTING, OR MISSING INREC OR OUTREC STATEMENT
OPERANDS
                BUILD=(%01,JFY=(SHIFT=LEFT,LEAD=C'"',TRAIL=C'"'))

                $

ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY

          *


On Fri, Dec 29, 2017 at 11:07 AM, Bill Ashton <[email protected]>
wrote:

> Hello! I am trying to use DFSORT to extract some records from a
> transaction work file to be displayed in Microsoft Excel (and also on the
> mainframe).
>
> The data contains a lot of hierarchical information (Customer, Region,
> Location, and contact people), and I would like to create a single record
> for each contact containing the whole hierarchy. I coded what I thought was
> the correct SORT statements, but I still get a confusing error on my INREC
> statement.
>
> I even cut the input down to a single IfTHEN statement, and that still
> flunked. I would appreciate Kolusu or someone else taking a look at this to
> see what I have missed.
>
> Here is my SYSIN (the INCLUDE works fine):
>   OPTION COPY,VLSCMP                  IT IS NOT REQUIRED, BUT USEFUL
> *
>   INCLUDE COND=(1,04,CH,EQ,C'CM03',OR,
>                 1,04,CH,EQ,C'CR02',OR,
>                 1,04,CH,EQ,C'CL01',OR,
>                 1,04,CH,EQ,C'CC02',OR,
>                 1,14,CH,EQ,C'>CUST MASTER$,',OR,
>                 1,10,CH,EQ,C'>CUST REG,',OR,
>                 1,11,CH,EQ,C'>CUST LOC1,',OR,
>                 1,12,CH,EQ,C'>CUST CONT$,')
>
>   INREC IFOUTLEN=245,
>         IFTHEN=(WHEN=(1,14,CH,EQ,C'>CUST MASTER$,'),
>            PARSE=(%01=(ABSPOS=15,ENDBEFR=C'(',FIXLEN=50))),
>         IFTHEN=(WHEN=(1,04,CH,EQ,C'CM03'),
>            PARSE=(%02=(ABSPOS=06,ENDBEFR=C' ',FIXLEN=5))),
>         IFTHEN=(WHEN=(1,10,CH,EQ,C'>CUST REG,'),
>            PARSE=(%03=(ABSPOS=11,ENDBEFR=C'(',FIXLEN=50))),
>         IFTHEN=(WHEN=(1,04,CH,EQ,C'CR02'),
>            PARSE=(%04=(ABSPOS=06,ENDBEFR=C' ',FIXLEN=3))),
>         IFTHEN=(WHEN=(1,11,CH,EQ,C'>CUST LOC1,'),
>            PARSE=(%05=(ABSPOS=12,ENDBEFR=C' ',FIXLEN=50))),
>         IFTHEN=(WHEN=(1,04,CH,EQ,C'CL01'),
>            PARSE=(%06=(ABSPOS=06,ENDBEFR=C' ',FIXLEN=3),
>                   %07=(ABSPOS=10,ENDBEFR=C' ',FIXLEN=15))),
>         IFTHEN=(WHEN=(1,12,CH,EQ,C'>CUST CONT$,'),
>            PARSE=(%08=(ABSPOS=13,ENDBEFR=C' ',FIXLEN=50))),
>         IFTHEN=(WHEN=(1,04,CH,EQ,C'CC02'),
>            PARSE=(%09=(ABSPOS=06,FIXLEN=3),
>                   %10=(ABSPOS=10,FIXLEN=2),
>                   %11=(ABSPOS=13,FIXLEN=1),
>                   %12=(ABSPOS=15,FIXLEN=1),
>                   %13=(ABSPOS=17,FIXLEN=5))),
>
>       BUILD=(%01,JFY=(SHIFT=LEFT,LEAD=C'"',TRAIL=C'",'))
>              %02,JFY=(SHIFT=LEFT,LEAD=C'"',TRAIL=C'",'),
>              %03,JFY=(SHIFT=LEFT,LEAD=C'"',TRAIL=C'",'),
>              %04,JFY=(SHIFT=LEFT,LEAD=C'"',TRAIL=C'",'),
>              %05,JFY=(SHIFT=LEFT,LEAD=C'"',TRAIL=C'",'),
>              %06,JFY=(SHIFT=LEFT,LEAD=C'"',TRAIL=C'",'),
>              %07,JFY=(SHIFT=LEFT,LEAD=C'"',TRAIL=C'",'),
>              %08,JFY=(SHIFT=LEFT,LEAD=C'"',TRAIL=C'",'),
>              %09,JFY=(SHIFT=LEFT,LEAD=C'"',TRAIL=C'",'),
>              %10,JFY=(SHIFT=LEFT,LEAD=C'"',TRAIL=C'",'),
>              %11,JFY=(SHIFT=LEFT,LEAD=C'"',TRAIL=C'",'),
>              %12,JFY=(SHIFT=LEFT,LEAD=C'"',TRAIL=C'"'))
>
>
> I am trying to create two output sets, but since I did not get the first
> to work, I did not even try the second. Hopefully someone can put me on the
> right track.
>
> I have attached a file with the data layout (it won't display right in
> HTML with multiple embedded spaces).
>
> Thanks for lending a hand here, and happy new year!
> Billy
>
> --
> Thank you and best regards,
> *Billy Ashton*
>



-- 
Thank you and best regards,
*Billy Ashton*

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

Reply via email to