Hi
I would like to have some help to do the particular problem using synctool.
I have two input PS
TRGE09.FIRST and TRGE09.SECOND (the record length is 10)
each PS contains a record and it contains a numerical value
and two output PS
TGRE09.OUT1 and TRGE09.OUT2 (the record length is 10)
I need to compare the fields from TRGE09.FIRST and TRGE09.SECOND
and if the first one is lesser than or equal to the second one
the first one is put into TGRE09.OUT1
or if the first one is greater than the second one
the second one is put into TRGE09.OUT2
some help in synctool
-
- Posts: 18
- Joined: Mon Feb 25, 2008 12:50 pm
- Skillset: mainframe rexx tso
- Referer: magazine
Re: some help in synctool
Huh?
Maybe some samples of the input and expected output might be helpful......
Maybe some samples of the input and expected output might be helpful......
-
- Global moderator
- Posts: 369
- Joined: Tue Feb 26, 2008 11:15 pm
- Skillset: Syncsort MFX for z/OS
- Referer: Dick Scherrer
- Location: USA
- Contact:
Re: some help in synctool
Let me see if I understand your requirements. Basically, you want to keep only the smaller values. If the smaller value comes from the 1st file, put it in OUTFIL1, doing nothing with the record from File2. However, if the smaller value is in File2, then write the record from File2 to OUTPUT2 and do nothing with the record from File1. Am I correct so far?
And is there a key field in each file that will correspond the records from File1 to File2?
And is there a key field in each file that will correspond the records from File1 to File2?
-
- Posts: 18
- Joined: Mon Feb 25, 2008 12:50 pm
- Skillset: mainframe rexx tso
- Referer: magazine
Re: some help in synctool
yes ,what you have said is correct. But there is no key field for each record
-
- Posts: 110
- Joined: Thu Dec 27, 2007 5:18 pm
- Skillset: Known little stuffs to answer a few queries!!
- Referer: Google
- Contact:
Re: some help in synctool
I have two input PS TRGE09.FIRST and TRGE09.SECOND (the record length is 10) each PS contains a record and it contains a numerical value
Does it mean each PS files has only one record?
Arun.
-
- Posts: 18
- Joined: Mon Feb 25, 2008 12:50 pm
- Skillset: mainframe rexx tso
- Referer: magazine
-
- Posts: 81
- Joined: Sat Jun 09, 2007 4:24 am
- Skillset: Some?
- Referer: mcmillan
- Location: Tucson AZ
Re: some help in synctool
As was said earlier:
CICS Guy wrote:Maybe some samples of the input and expected output might be helpful......
-
- Global moderator
- Posts: 369
- Joined: Tue Feb 26, 2008 11:15 pm
- Skillset: Syncsort MFX for z/OS
- Referer: Dick Scherrer
- Location: USA
- Contact:
Re: some help in synctool
Any reason for wanting to specifically use SYNCTOOL for this application instead of SyncSort?fazillatheef wrote:I would like to have some help to do the particular problem using synctool.
-
- Global moderator
- Posts: 369
- Joined: Tue Feb 26, 2008 11:15 pm
- Skillset: Syncsort MFX for z/OS
- Referer: Dick Scherrer
- Location: USA
- Contact:
Re: some help in synctool
Here is 1 possible SYNCTOOL solution:
However, I think that a SyncSort JOIN application may also suit your needs. Let me kow if you are interested.
Code: Select all
//S1 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=TRGE09.FIRST
//IN2 DD DSN=TRGE09.SECOND
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT1 DD DSN=TGRE09.OUT1
//OUT2 DD DSN=TGRE09.OUT2
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT1) ON(21,8,ZD) WITH(11,10) USING(CTL3)
SPLICE FROM(T1) TO(OUT2) ON(21,8,ZD) WITH(11,10) USING(CTL4)
/*
//CTL1CNTL DD *
INREC BUILD=(1,10,21:SEQNUM,8,ZD)
/*
//CTL2CNTL DD *
INREC BUILD=(11:1,10,21:SEQNUM,8,ZD)
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT1,INCLUDE=(1,10,ZD,LE,11,10,ZD),OUTREC=(1,10)
/*
//CTL4CNTL DD *
OUTFIL FNAMES=OUT2,INCLUDE=(11,10,ZD,LT,1,10,ZD),OUTREC=(11,10)
/*
However, I think that a SyncSort JOIN application may also suit your needs. Let me kow if you are interested.
-
- Posts: 18
- Joined: Mon Feb 25, 2008 12:50 pm
- Skillset: mainframe rexx tso
- Referer: magazine
Re: some help in synctool
Thank you