IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SYNCSORT Combine three different datasets into one


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mustafaamani

New User


Joined: 02 Feb 2007
Posts: 10
Location: chennai

PostPosted: Mon Oct 29, 2007 4:15 pm
Reply with quote

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
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Mon Oct 29, 2007 4:33 pm
Reply with quote

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
View user's profile Send private message
mustafaamani

New User


Joined: 02 Feb 2007
Posts: 10
Location: chennai

PostPosted: Mon Oct 29, 2007 6:15 pm
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Mon Oct 29, 2007 6:23 pm
Reply with quote

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
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Mon Oct 29, 2007 7:41 pm
Reply with quote

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
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Mon Oct 29, 2007 7:51 pm
Reply with quote

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
View user's profile Send private message
mustafaamani

New User


Joined: 02 Feb 2007
Posts: 10
Location: chennai

PostPosted: Mon Oct 29, 2007 10:25 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
No new posts PL/I, VB Datasets and the RDW PL/I & Assembler 4
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
No new posts DFSORT/SYNCSORT/ICETOOL JCL & VSAM 8
Search our Forums:

Back to Top