Ron,

I think this could do the needed:

//ST010 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//EXCLUDE DD *
4046340¦CORPORATIVO
4046564¦CORPORATIVO
4046564¦ESTADO
4047131¦CORPORATIVO
4047460¦CORPORATIVO
4047479¦CORPORATIVO
/*
//ALL     DD *
4046340¦CORPORATIVO
4046564¦CORPORATIVO
4046564¦ESTADO
4047131¦CORPORATIVO
4047460¦CORPORATIVO
4047479¦CORPORATIVO
/*
//JNF2CNTL DD *
 INCLUDE COND=(9,11,CH,NE,C'CORPORATIVO')
 SUM FIELDS=NONE
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
 JOINKEYS F1=ALL,FIELDS=(1,7,A)
 JOINKEYS F2=EXCLUDE,FIELDS=(1,7,A)
 JOIN UNPAIRED,F1,ONLY
 REFORMAT FIELDS=(F1:1,80)
 SORT FIELDS=COPY
/*

Best regards.
Massimo

Il giorno mar 23 apr 2019 alle ore 17:12 Ron Thomas <[email protected]> ha
scritto:

> Hi -
> We have a file that is received from a vendor ( item_nbr 10 byes and
> location 20 bytes) . File is a 80 byte FB record
>
> item_nbr    location
> 4046340¦CORPORATIVO
> 4046564¦CORPORATIVO
> 4046564¦ESTADO
> 4047131¦CORPORATIVO
> 4047460¦CORPORATIVO
> 4047479¦CORPORATIVO
>
> Here we need to extract item_nbrs that has only "CORPORATIVO"  location
> and no other location defined . In the example above it should pull
>
> 4046340¦CORPORATIVO
> 4047131¦CORPORATIVO
>
>  in the output file.
>
> If we look 4046564, that is defined for CORPORATIVO and ESTADO  so that
> should not be picked in the o/p file. Could anyone please let me know
> how to do in DFSORT job
>
> Thanks
> Ron T
>
> ----------------------------------------------------------------------
> 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