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
SYNCSORT DATASORT message SYT076E
-
- Posts: 3
- Joined: Thu Dec 23, 2021 10:19 pm
- Skillset: z/OS
- Referer: google search
- sergeyken
- Posts: 458
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: SYNCSORT DATASORT message SYT076E
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.
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.
Last edited by sergeyken on Thu Dec 23, 2021 11:29 pm, edited 1 time in total.
Javas and Pythons come and go, but JCL and SORT stay forever.
-
- Posts: 3
- Joined: Thu Dec 23, 2021 10:19 pm
- Skillset: z/OS
- Referer: google search
Re: SYNCSORT DATASORT message SYT076E
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
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
- sergeyken
- Posts: 458
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: SYNCSORT DATASORT message SYT076E
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".
Javas and Pythons come and go, but JCL and SORT stay forever.
- sergeyken
- Posts: 458
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: SYNCSORT DATASORT message SYT076E
f1_lemaner wrote:It's ok with the following sort :Code: Select all
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.
Code: Select all
//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
//
Code: Select all
********************************* TOP OF DATA ********
* THIS IS A HEADER
THIS IS NEW DATA RECORD
******************************** BOTTOM OF DATA ******
Javas and Pythons come and go, but JCL and SORT stay forever.
-
- Posts: 3
- Joined: Thu Dec 23, 2021 10:19 pm
- Skillset: z/OS
- Referer: google search
Re: SYNCSORT DATASORT message SYT076E
Thanks a lot sergeyken, I have adapted your suggested SYSIN to my header and it work's fine.
Best Regards
Best Regards
-
- Similar Topics
- Replies
- Views
- Last post
-
- 13
- 8385
-
by valeca
View the latest post
Fri Sep 30, 2022 11:22 pm
-
-
How can I copy message queue files (LGMSG,SHMSG) in V9R1
by futohomok » Thu Jul 27, 2023 5:54 pm » in IMS DB/DC - 6
- 1983
-
by futohomok
View the latest post
Thu Aug 03, 2023 1:21 pm
-
-
-
Insert Delimiters In File Using SYNCSORT
by Mobius » Wed Sep 07, 2022 10:48 pm » in DFSORT/ICETOOL/ICEGENER - 2
- 2091
-
by Mobius
View the latest post
Thu Sep 08, 2022 7:19 pm
-