Page 1 of 2

Using two input files in Synctool

PostPosted: Tue Jun 07, 2011 4:21 pm
by pjagathis
Hi,

//JSTEP050 EXEC PGM=SYNCTOOL                     
//TOOLMSG  DD SYSOUT=*                                 
//DFSMSG   DD SYSOUT=*                                           
//CMTCNTL  DD DSN=Input File1,
//            DISP=SHR                                                 
//NCNTL  DD DSN=Input File2,,
//            DISP=SHR                                           
//CSTMCNTL DD DSN=Output File, 
//            DISP=(,CATLG,DELETE),                 
//            UNIT=SYSDA,SPACE=(CYL,(50,50),RLSE)                                                 
//TOOLIN   DD *                                       
  SORT FROM(CMTCNTL,NCNTL) TO(CSTMCNTL) USING(CTL1)   
/*                 
//CTL1CNTL DD *   
  SORT FIELDS=COPY
/*                 
//**   



Error Meassage:

SYT001I INITIAL PROCESSING MODE IS "STOP"
SYT002I "TOOLIN" INTERFACE BEING USED

SORT FROM((CMTCNTL),(NCNTL)) TO(CSTMCNTL) USING(CTL1)
SYT069E "FROM" VALUE IS NOT A VALID DDNAME
SYT030I OPERATION COMPLETED WITH RETURN CODE 12

SYT015I PROCESSING MODE CHANGED FROM "STOP" TO "SCAN" DUE TO OPERATION FAILURE

SYT004I SYNCTOOL PROCESSING COMPLETED WITH RETURN CODE 12
*****************************************************************************************************************************************

Please help me to use two input file in synctool and create an output File.

Re: Using two input files in Synctool - Urgent

PostPosted: Tue Jun 07, 2011 4:34 pm
by BillyBoyo
Look up the syntax of the SORT statement. The message is telling you that it thinks "FROM" is a DDNAME, so it looks like SORT FROM is a no-no.

I can't see what you are actually doing. Do you just want to sort two files? Just copy two together? What?

Re: Using two input files in Synctool

PostPosted: Tue Jun 07, 2011 6:04 pm
by pjagathis
HI BillyBoyo,

Actually i creating two files in the same synctool step.Then i combining those two files to single file.
So need help in how to give TWO FILES as a input in SORT FROM( File1 File2) TO(File3) USING(CTL1)

Please help me in getting syntax for giving two files as input for above statement...

I think now you are clear!

Re: Using two input files in Synctool

PostPosted: Wed Jun 08, 2011 12:04 am
by dick scherrer
Hello,

I think now you are clear!
Ahh, Maybe not. . .

Suggest you post a bit of simple input data from both files and the output you want when the sample input is processed.

Post the recfm and lrecl for all files and explain any rules to be used to get from the inputs to the output.

Re: Using two input files in Synctool

PostPosted: Wed Jun 08, 2011 1:19 am
by NicC
Why are you using SYNCTOOL? Why not SYNCSORT with copy option and concatenate the two files on SORTIN? Or use IEBGENER with the 2 files concatenated on SYSUT1?

Re: Using two input files in Synctool

PostPosted: Wed Jun 08, 2011 2:03 am
by dick scherrer
Hi Nic,

If we can get TS to show some test data, we can probably make a better recommendation as to which to use. . .

d

Re: Using two input files in Synctool

PostPosted: Wed Jun 08, 2011 9:17 am
by pjagathis
Hi,

The following is my requirement,

//JSTEP050 EXEC PGM=SYNCTOOL
//**
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//**
//INPUTFL DD DSN=INPUT FILE, (LRECL=824,RECFM=FB)
// DISP=SHR
//*
//CCNTL DD DSN=OUTPUTFILE1,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(50,50),RLSE),
// DCB=(RECFM=FB,LRECL=825,BLKSIZE=0)
//*
//MCNTL DD DSN=OUTPUTFILE2,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(50,50),RLSE),
// DCB=(RECFM=FB,LRECL=825,BLKSIZE=0)
//*
//TCNTL DD DSN=OUTPUT FILE3,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(50,50),RLSE),
// DCB=(RECFM=FB,LRECL=825,BLKSIZE=0)
//*
//NCNTL DD DSN=OUTPUT FILE4,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(50,50),RLSE),
// DCB=(RECFM=FB,LRECL=825,BLKSIZE=0)
//**
//FCNTL DD DSN=OUTPUT FILE5,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(50,50),RLSE),
// DCB=(RECFM=FB,LRECL=825,BLKSIZE=0)
//**
//TOOLIN DD *
SORT FROM(INPUTFL) TO(CCNTL) USING(CTL1)
SORT FROM(INPUTFL) TO(MCNTL) USING(CTL2)
SORT FROM(INPUTFL) TO(TCNTL) USING(CTL3)
SORT FROM(INPUTFL) TO(NCNTL) USING(CTL4)
SORT FROM(CCNTL,MCNTL,TCNTL,NCNTL) TO(FCNTL) USING(CTL5)

/*
//CTL1CNTL DD *
INCLUDE COND=(132,04,CH,EQ,C'XXXX')
**
INREC IFTHEN=(WHEN=(132,04,CH,EQ,C'XXXX'),
OVERLAY=(825:C'C'))
**
/*
//CTL2CNTL DD *
INCLUDE COND=(132,08,CH,EQ,C'YYYYYYYY')
**
INREC IFTHEN=(WHEN=(132,08,CH,EQ,C'YYYYYYYY'),
OVERLAY=(825:C'M'))
**
/*
//CTL3CNTL DD *
INCLUDE COND=(132,17,CH,EQ,C'ZZZZZZZZZZZZZZZZZ')
**
INREC IFTHEN=(WHEN=(132,17,CH,EQ,C'ZZZZZZZZZZZZZZZZZ'),
OVERLAY=(825:C'T'))
**
//CTL4CNTL DD *
INCLUDE COND=(132,04,CH,EQ,C'XXXX',OR,
132,08,CH,EQ,C'YYYYYYYY',OR,
132,17,CH,EQ,C'ZZZZZZZZZZZZZZZZZ')
**
INREC IFTHEN=(WHEN=(132,04,CH,EQ,C'XXXX'),
OVERLAY=(825:C'N')),
IFTHEN=(WHEN=(132,08,CH,EQ,C'YYYYYYYY'),
OVERLAY=(825:C'N')),
IFTHEN=(WHEN=(132,17,CH,EQ,C'ZZZZZZZZZZZZZZZZZ'),
OVERLAY=(825:C'N'))
**
/*
//CTL5CNTL DD *
SORT FIELDS=COPY
/*
//**




I need syntax for only for my highlighted (red) line. Remaining works fine. I need help on this....

Re: Using two input files in Synctool

PostPosted: Wed Jun 08, 2011 9:34 am
by dick scherrer
Hello,

The following is my requirement,
Not a requirement - merely what has been coded so far to meet some requirement. The requirement has not been posted. . .

Which is why you were asked to show some sample input data and the output you want when the sample input is processed. . .

Re: Using two input files in Synctool

PostPosted: Thu Jun 09, 2011 12:05 pm
by pjagathis
Hi Dick,

Please help me in following syntax

SORT FROM(INPUTFL) TO(CCNTL) USING(CTL1)
SORT FROM(INPUTFL) TO(MCNTL) USING(CTL2)
SORT FROM(INPUTFL) TO(TCNTL) USING(CTL3)
SORT FROM(INPUTFL) TO(NCNTL) USING(CTL4)
SORT FROM(CCNTL,MCNTL,TCNTL,NCNTL) TO(FCNTL) USING(CTL5)

I want to give more than one DD name in FROM,then tell me how to give the SYNTAX..

Please let me know the correct syntax for giving more than one DD name in SORT FROM( DD1,2,3,..)...

Please advice ..

Re: Using two input files in Synctool

PostPosted: Thu Jun 09, 2011 4:53 pm
by NicC
Please let me know the correct syntax for giving more than one DD name in SORT FROM( DD1,2,3,..)...


The syntax is in the manual. If it does not show syntax for multiple DDs then it is not possible.

Why not write the output from your 4 selects to one file and sort that? You may need MOD in your disposition for selects 2, 3 and 4.