SYSIN :
SORT FIELDS=(01,16,ZD,D)
OUTFIL ENDREC=1,
BUILD=(C'ANO-DT-JTRB-PRCD,',1,4,80:X,/,
C'MES-DT-JTRB-PRCD,',5,2,/,
C'DIA-DT-JTRB-PRCD,',7,2,/,
C'NR-PSSL-PRCD,',9,8)
SYSIN :
INCLUDE COND=(ANO-DT-JTRB,GT,ANO-DT-JTRB-PRCD,OR,
(ANO-DT-JTRB,EQ,ANO-DT-JTRB-PRCD,AND,
MES-DT-JTRB,GT,MES-DT-JTRB-PRCD),OR,
(ANO-DT-JTRB,EQ,ANO-DT-JTRB-PRCD,AND,
MES-DT-JTRB,EQ,MES-DT-JTRB-PRCD,AND,
DIA-DT-JTRB,GT,DIA-DT-JTRB-PRCD),OR,
(ANO-DT-JTRB,EQ,ANO-DT-JTRB-PRCD,AND,
MES-DT-JTRB,EQ,MES-DT-JTRB-PRCD,AND,
DIA-DT-JTRB,EQ,DIA-DT-JTRB-PRCD,AND,
NR-PSSL,GT,NR-PSSL-PRCD),OR,
TIP-REG,EQ,0,OR,TIP-REG,EQ,9)
SORT FIELDS=(TIP-REG,A,
ANO-DT-JTRB,A,
MES-DT-JTRB,A,
DIA-DT-JTRB,A,
NR-PSSL,A)
DATA DICTIONARY SYMBOLS SUBSTITUTED :
INCLUDE COND=(16,4,ZD,GT,2013,OR,(16,4,ZD,EQ,2013,AND,13,2,ZD,GT,9),OR,(16,4,ZD,
EQ,2013,AND,13,2,ZD,EQ,9,AND,10,2,ZD,GT,24),OR,(16,4,ZD,EQ,2013,AND,13,2,ZD,EQ,9
,AND,10,2,ZD,EQ,24,AND,2,8,ZD,GT,70000),OR,1,1,ZD,EQ,0,OR,1,1,ZD,EQ,9)
SORT FIELDS=(1,1,ZD,A,16,4,ZD,A,13,2,ZD,A,10,2,ZD,A,2,8,ZD,A)
Interesting that SYMNAMES works even if it's filled with NULL character on the right (I was also creating a temp and then copying to 80). And it also works with spaces on the right.
BillyBoyo, I learned a lot with you. Thank you very much.
I didn't understand this. What do you mean by “actioned” and “line-numbers on”?
What's your approach when you need to compare the value in one dataset with the records in another dataset? Not to join the datasets, but to use in a condition like I used in this case.