Posted: Tue Sep 21, 2004 9:06 am Post subject: Syncsort: Pass a value to Sysin
I am planning to use sync sort to delete particular records in a file. I would use date as parameter to delete records. If date on a particular row is less than DATEA then do not include the record.
Can I pass the DATEA thru the JCL ? or it should be hard coded in the sysin for the SORT ? if it is impossible I may need to use cobol .
//VIVEKPD JOB CARD
// STEP 1 EXEC PGM=DAILY1,PARM=M
//INDD DD DSN=INPUT.DATASET,DISP=SHR
//OUTDD DD DSN=OUTPUT.DATASET,DISP=SHR
//* PARMLIB HAS DATE RANGE FOR PROCESSING
//SYSIN DD DNS=VIVEK.PARMLIB,DISP=SHR
//* NEXT STEP SORT
I want to put the sort in the next step.
The dataset i want to process has record lenght of 80 , fixed. the date is ccyymmdd format.
vivek.parmlib is changed monthly to put the monthly date range for processing the step 1. after step 1 i need to remove all rows with date less than or equal to the highest value in the date range.
Am i clear ? _________________ Vivek,NJ
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Tue Sep 21, 2004 10:50 am Post subject:
vivek,
The following JCL will give you the desired results. I assumed that vivek.parmlib has the cut off date in the first 8 bytes.
And the date to be vaildate is in position 10 of the input file. The first copy operator generates a control card as follows which will be used as control card to eliminate the unwanted records.
Instead of having a string '20040920' after validate , is there anyway to send value from previous parmlib ?
//SYMNAMES DD *
VALIDATE,C'20040920'
I am not comfortable with synctool since I don't have manuals with me. Is synctool part of syncsort ? I am not even sure if I have synctool in my shop
from a previous parmlib dataset ? _________________ Vivek,NJ
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Tue Sep 21, 2004 2:39 pm Post subject:
Vivek,
Quote:
Instead of having a string '20040920' after validate , is there anyway to send value from previous parmlib ?
When you are updating your parmlib with date range, you can create another parm for SYMNAMES dataset. or we can use the same parmlib if it is only used for the filteration of data.
Quote:
I am not comfortable with synctool since I don't have manuals with me. Is synctool part of syncsort ? I am not even sure if I have synctool in my shop
Synctool is a part of syncsort, but it is an undocumented/unsupported feature of synctool. If you are skeptical about its usage you can split my job into 2 steps using traditional sort.
We are dynamically generating the control cards. We need to put quotes around the date field. so we need to generate the quote ' dynamically. So we enclosed in quotes so that we can quote as a character.
Quote:
i see syncsort version is 3.7dn is this the latest ?
You don't have the latest version of syncsort. The latest version of syncsort is SYNCSORT FOR Z/OS 1.2
Posted: Wed Sep 22, 2004 3:37 pm Post subject: am i missing something ?
Kolusu,
i get this error in clude statement at the DATE1 parameter. since mine is not a Z/OS version of SORT , is this causing the problem.
what would be alternate ?
SYNCSORT 3.7DN TPF3A US PATENTS: 4210961,5117495, OTHER PAT. PEND. (C) 1998 S
z/OS 1.2.0 CPU MODEL 9672
SYSIN :
INREC FIELDS=(1,80)
OUTREC FIELDS=(1,80)
SORT FIELDS=COPY
INCLUDE COND=(14,8,CH,EQ,DATE1)
*
SUM FIELDS=NONE
WER038I WARNING: SYNCSORT MVS IS NOT CERTIFIED TO RUN ON Z/OS. CONTACT SYNCSOR
WER268A INCLUDE STATEMENT : SYNTAX ERROR
******************************** BOTTOM OF DATA ********************************
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum