View previous topic :: View next topic
|
Author |
Message |
mustafaamani
New User
Joined: 02 Feb 2007 Posts: 10 Location: chennai
|
|
|
|
I have three different input datasets. From the first one I have to remove first nine records, from second one I want to remove first 5 records and copy all the remaining records of first and second datasets along with all the records of third datasets into an output dataset.
Mustafa |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
mustafaamani
Code: |
//*******************************************************
//STEP001 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD I/P FILE-1
//IN2 DD I/P FILE-2
// DD I/P FILE-3
//OUT DD O/P FILE,DISP=MOD
//TOOLIN DD *
COPY FROM(IN1) TO(OUT) USING(CP01)
COPY FROM(IN2) TO(OUT) USING(CP02)
/*
//CP01CNTL DD *
SKIPREC=9
/*
//CP02CNTL DD *
SKIPREC=5
/*
|
|
|
Back to top |
|
|
mustafaamani
New User
Joined: 02 Feb 2007 Posts: 10 Location: chennai
|
|
|
|
Hi krisprems,
Thanks for ur help. Now i am getting following error
SYT000I SYNCTOOL RELEASE 1.5.3 - COPYRIGHT 2004 SYNCSORT INC.
SYT001I INITIAL PROCESSING MODE IS "STOP"
SYT002I "TOOLIN" INTERFACE BEING USED
SYT006E NO "TOOLIN" DD STATEMENT FOUND
SYT004I SYNCTOOL PROCESSING COMPLETED WITH RETURN CODE 12
Can you please help on this? |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
mustafaamani,
What KrisPrems suggested use ICETOOL (DFSORT product). But your shop has SYNCSORT installed.
If I remeber correctly, Use STARTREC in place of SKIPREC. |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
mustafaamani
Quote: |
SYT006E NO "TOOLIN" DD STATEMENT FOUND
|
Check whether you have specified the TOOLIN statement as i have done in my ICETOOL JOB.
Else provied the ICETOOL/SYNCTOOL JOB that you have submitted, to help you further.
Or else if you are not comfortable using ICETOOL/SYNCTOOL, just use this SORT JOB
Code: |
//*******************************************************
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=I/P FILE-1
//SORTOUT DD DSN=O/P-FILE,DISP=MOD
//SYSIN DD *
SORT FIELDS=COPY,SKIPREC=9
/*
//*******************************************************
//STEP2 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=I/P FILE-2
// DD DSN=I/P FILE-3
//SORTOUT DD DSN=O/P-FILE,DISP=MOD
//SYSIN DD *
SORT FIELDS=COPY,SKIPREC=5
/*
|
|
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
Murli.
Quote: |
If I remeber correctly, Use STARTREC in place of SKIPREC.
|
Have you tried this?
STARTREC and ENDREC are compiant with OUTFIL. So if you want to use STARTREC and ENDREC
my control card would be
Code: |
//CP01CNTL DD *
OUTFIL STARTREC=9
/*
|
|
|
Back to top |
|
|
mustafaamani
New User
Joined: 02 Feb 2007 Posts: 10 Location: chennai
|
|
|
|
Hi Murli & KrisPrems,
Thanks very much for your help. But unfortunately this was not working out for me. So i have written one quickjob program instead to perform the required functioanlity in one step. Since this was only one time activity.
Thanks once again,
Mustafa |
|
Back to top |
|
|
|