Page 1 of 1

SYNCSORT DATASORT message SYT076E

PostPosted: Thu Dec 23, 2021 11:12 pm
by f1_lemaner
Hello all,
I have a VSAM KSDS with records containing the date in packed decimal and I need to remove records with date less that today's date -30

It's ok with the following sort :

SORT FIELDS=COPY
INCLUDE COND=(7,4,PD,GT,DATE3P-30)

Now my problem is that the 1st record is a header that I need to keep in the output file

I try the following found in the doc "Smart DFSORT Tricks"

//TOOLIN DD *
DATASORT FROM(IN) TO(OUT) FIRST USING(CTL1)
/*
//CTL1CNTL DD *
SORT FIELDS=COPY
INCLUDE COND=(7,4,PD,GT,DATE3P-30)
/*

It fails with message SYT076E

SYT000I SYNCTOOL RELEASE 3.1.2 - COPYRIGHT 2018 SYNCSORT INC.
SYT001I INITIAL PROCESSING MODE IS "STOP"
SYT002I "TOOLIN" INTERFACE BEING USED

DATASORT FROM(IN) TO(OUT) FIRST USING(CTL1)
SYT020I SYNCSORT CALLED WITH IDENTIFIER "0001"
SYT076E SORT STATEMENT MUST BE USED WITH "DATASORT" OPERATOR
SYT030I OPERATION COMPLETED WITH RETURN CODE 12

SYT004I SYNCTOOL PROCESSING COMPLETED WITH RETURN CODE 12
SYNCSORT FOR Z/OS 3.1.2.0NI U.S. PATENTS: 4210961, 5117495 (C) 2018 SYNCSORT INC.
z/OS 2.3.0
SYNCSORT LICENSED FOR xxxxxxxx LICENSE/PRODUCT
CTL1CNTL :
SORT FIELDS=COPY
INCLUDE COND=(7,4,PD,GT,DATE3P-30)
PARMLIST :
OPTION RESINV=0,ARESINV=0,MSGDDN=DFSMSG,SORTIN=IN,SORTDD=CTL1,SORTOUT=OUT,DYNALL
OC,CMP=CLC,NOVLSHRT,EQUALS,VLSCMP
SORT FIELDS=COPY
MODS E15=(SYNC££15,4096,,N),E35=(SYNC££35,4096,,N)
WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER428I CALLER-PROVIDED IDENTIFIER IS "0001"
******************************** BOTTOM OF DATA ******************************************

Can someone tell me what is wrong ?
Thanks a lot for your help and best regards

Re: SYNCSORT DATASORT message SYT076E

PostPosted: Thu Dec 23, 2021 11:20 pm
by sergeyken
Do not use the tricks recommended for DFSORT when working with SYNCSORT, and vice versa.

This is what is wrong.

The same way: you cannot use the tricks for C++ programming when coding in COBOL...

In your particular case, just one blank character is missing. Try to guess: which one?

P.P.S.
In your case, there is no need to involve SYNCTOOL/ICETOOL; a simple SYNCSORT/DFSORT would be enough for doing what you need, with no unneeded complications.

Re: SYNCSORT DATASORT message SYT076E

PostPosted: Thu Dec 23, 2021 11:27 pm
by f1_lemaner
Hello,
Sorry but it's not the same debate

C++ and COBOL are 2 different languages.

SYNSORT is sold as a fully compatible replacement product of DFSORT

Any valid DFSORT SYSIN must also be valid with SYNCSORT

Re: SYNCSORT DATASORT message SYT076E

PostPosted: Thu Dec 23, 2021 11:33 pm
by sergeyken
f1_lemaner wrote:SYNSORT is sold as a fully compatible replacement product of DFSORT

Any valid DFSORT SYSIN must also be valid with SYNCSORT

Those are two completely separate products, from different companies.

Nobody has ever given any obligation on their "full compatibility".

There are multiple versions of compilers for almost any programming language. None of them is "fully compatible".

Re: SYNCSORT DATASORT message SYT076E

PostPosted: Fri Dec 24, 2021 1:09 am
by sergeyken
f1_lemaner wrote:It's ok with the following sort :

 SORT FIELDS=COPY                      
 INCLUDE COND=(7,4,PD,GT,DATE3P-30)    
 

Now my problem is that the 1st record is a header that I need to keep in the output file

Absolutely no trick is needed. Everything is as straightforward as possible.

//SORT     EXEC PGM=SYNCSORT                            
//SYSOUT   DD  SYSOUT=*                                
//SORTIN   DD  *                                        
* THIS IS A HEADER                                                    
         THIS IS OLD DATA RECORD dated 2021/111                                     
221144444ECCE4CE4DDC4CCEC4DCCDDC4444444444444444444444444444444444444444 <- hex dump
011C00000389209206340413109536940000000000000000000000000000000000000000 <- hex dump
-----------------------------------------------------------------------
         THIS IS NEW DATA RECORD dated 2021/360                                     
223044444ECCE4CE4DCE4CCEC4DCCDDC4444444444444444444444444444444444444444 <- hex dump
016C00000389209205560413109536940000000000000000000000000000000000000000 <- hex dump
----------------------------------------------------------------------- //*                                                    
//SORTOUT  DD  SYSOUT=*                                
//*                                                    
//SYSIN    DD  *                                        
 INCLUDE COND=(1,1,CH,EQ,C'*',     allow header(s)                          
            OR,1,4,PD,GT,&DATE3P-30)    allow new dates (last 30 days, and future dates too!)                  
 SORT FIELDS=COPY                                      
 END                                                    
//


********************************* TOP OF DATA ********
* THIS IS A HEADER                                  
         THIS IS NEW DATA RECORD                    
******************************** BOTTOM OF DATA ******

Re: SYNCSORT DATASORT message SYT076E

PostPosted: Fri Dec 24, 2021 2:23 pm
by f1_lemaner
Thanks a lot sergeyken, I have adapted your suggested SYSIN to my header and it work's fine.
Best Regards