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

Syncsort/ICETOOL query


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

New User


Joined: 15 Mar 2007
Posts: 8
Location: delhi

PostPosted: Thu Apr 15, 2010 10:36 pm
Reply with quote

Hi,

I have a query which i need to solve throgh ICE TOOL.

I have three flat files which has one field in common. But that field is repeated again in the file 1 & File2 but unique in file 3. In the below file 1 has 6 records but first 10 byte of the records are repeated 3 times. In the second file same first 10 byte is repeated 2 times and in the third file it is unique. So in the output file i will be having 12 records as one record in the input file 1 is repeated 2 times in the file2 so it will be written twice.
I want to solve this query through sort or ICETOOL. Please check the below example and provide me the JCL for this.

File1 - Length 30 byte
Code:
JET0000001COM   HIMANSHU KAUSH
JET0000001FAR   HIMANSHU KAUSH
JET0000001PREPR HIMANSHU KAUSH
JET0000002COM   HIMANSHU KAUSH
JET0000002FAR   HIMANSHU KAUSH
JET0000002PREPR HIMANSHU KAUSH


File 2 -Length 20 Byte
Code:
JET0000001NABCDE/XYZ
JET0000001YABCDE/XYZ
JET0000002NABCDE/XYZ
JET0000002YABCDE/XYZ
JET0000003NABCDE/XYZ
JET0000003YABCDE/XYZ


FILE 3 - LENGTH 15 BYTE
Code:
JET0000001YESNO
JET0000002YESNO
JET0000003YESNO


I Want my output files like -

Output file - LENGTH 31 BYTE

Code:
COM   JET0000001NABCDE/XYZYESNO
COM   JET0000001YABCDE/XYZYESNO
FAR   JET0000001NABCDE/XYZYESNO
FAR   JET0000001YABCDE/XYZYESNO
PREPR JET0000001NABCDE/XYZYESNO
PREPR JET0000001YABCDE/XYZYESNO
COM   JET0000002NABCDE/XYZYESNO
COM   JET0000002YABCDE/XYZYESNO
FAR   JET0000002NABCDE/XYZYESNO
FAR   JET0000002YABCDE/XYZYESNO
PREPR JET0000002NABCDE/XYZYESNO
PREPR JET0000002YABCDE/XYZYESNO
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Apr 15, 2010 11:23 pm
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for. You'll need the DFSORT Nov, 2009 PTF to use DFSORT's JOINKEYS function.
For more information on this PTF, see:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000174

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//IN1 DD DSN=...  input file1 (FB/30)
//IN2 DD DSN=...  input file2 (FB/20)
//IN3 DD DSN=...  input file3 (FB/10)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT DD DSN=...  output file (FB/31)
//TOOLIN DD *
COPY JKFROM TO(T1) USING(CTL1)
COPY JKFROM TO(OUT) USING(CTL2)
/*
//CTL1CNTL DD *
  JOINKEYS F1=IN1,FIELDS=(1,10,A),SORTED,TASKID=AA
  JOINKEYS F2=IN2,FIELDS=(1,10,A),SORTED,TASKID=AA
  REFORMAT FIELDS=(F1:11,6,1,10,F2:11,10)
/*
//CTL2CNTL DD *
  JOINKEYS F1=T1,FIELDS=(7,10,A),SORTED,TASKID=BB
  JOINKEYS F2=IN3,FIELDS=(1,10,A),SORTED,TASKID=BB
  REFORMAT FIELDS=(F1:1,26,F2:11,5)
/*


If you don't have the Nov, 2009 PTF, ask your System Programmer to install it (it's free).
Back to top
View user's profile Send private message
Himanshu-kaushik

New User


Joined: 15 Mar 2007
Posts: 8
Location: delhi

PostPosted: Fri Apr 16, 2010 11:02 am
Reply with quote

Hi Frank,

After submitting the JCL I am getting MAXCC 12.
Please check my JCL.

Code:
//TSO51AOA JOB (IT-00,'H12/1386'),'DB2 SQL',                 
//          CLASS=3,MSGCLASS=O,                             
//         NOTIFY=&SYSUID                                   
//*                                                         
//S1    EXEC  PGM=ICETOOL                                   
//TOOLMSG DD SYSOUT=*                                       
//DFSMSG  DD SYSOUT=*                                       
//SYSUDUMP DD SYSOUT=*                                       
//IN1 DD DSN=TLIFE20.TSO51AO.ZETS.SCHEDULE.TEST,DISP=SHR     
//IN2 DD DSN=TLIFE20.TSO51AO.ZETS.MAPPER.TEST,DISP=SHR       
//IN3 DD DSN=TLIFE20.TSO51AO.ZETS.TTRPT.TEST,DISP=SHR       
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)   
//OUT DD DSN=TLIFE20.TSO51AO.ZETS.OUTPUT.TEST,DISP=OLD       
//TOOLIN DD *                                               
COPY JKFROM TO(T1) USING(CTL1)                               
COPY JKFROM TO(OUT) USING(CTL2)                             
/*                                                           
//CTL1CNTL DD *                                             
  JOINKEYS F1=IN1,FIELDS=(1,10,A),SORTED,TASKID=AA           
  JOINKEYS F2=IN2,FIELDS=(1,10,A),SORTED,TASKID=AA     
  REFORMAT FIELDS=(F1:11,6,1,10,F2:11,10)               
/*                                                     



I am getting below error.

Code:
SYT000I  SYNCTOOL RELEASE 1.6.2 - COPYRIGHT 2007  SYNCSORT INC.                 
SYT001I  INITIAL PROCESSING MODE IS "STOP"                                     
SYT002I  "TOOLIN" INTERFACE BEING USED                                         
                                                                               
         COPY JKFROM TO(T1) USING(CTL1)                                         
SYT050E  INVALID OPERAND ON "COPY" STATEMENT                                   
SYT030I  OPERATION COMPLETED WITH RETURN CODE 12                               
                                                                               
SYT015I  PROCESSING MODE CHANGED FROM "STOP" TO "SCAN" DUE TO OPERATION FAILURE
                                                                               
         COPY JKFROM TO(OUT) USING(CTL2)                                       
SYT050E  INVALID OPERAND ON "COPY" STATEMENT                                   
                                                                               
SYT004I  SYNCTOOL PROCESSING COMPLETED WITH RETURN CODE 12


Please let me know how to solve this problem.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Apr 16, 2010 3:13 pm
Reply with quote

Quote:
SYT050E INVALID OPERAND ON "COPY" STATEMENT


... what does the manual say about the message ?
... what are the operands allowed on a copy statement ?

meditate on those questions, and You will be be able to solve the issue Yourself!
Back to top
View user's profile Send private message
Himanshu-kaushik

New User


Joined: 15 Mar 2007
Posts: 8
Location: delhi

PostPosted: Fri Apr 16, 2010 3:16 pm
Reply with quote

I don't have manual.

Nobody at my place used this type of condition before so nobody knows here. That is why i need help.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Apr 16, 2010 4:14 pm
Reply with quote

Quote:
don't have manual.


a forum is not a tool meant to fix poor organization issues icon_cool.gif

in many topics where the TS complained about the lack of syncsort manuals
Alissa Margulis was available to take actions in order to provide them!
search the forums and You will find the Alissa' s contact email address
like for example in ...
ibmmainframes.com/viewtopic.php?t=41086&highlight=alissa+manuals
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Apr 16, 2010 10:35 pm
Reply with quote

Himanshu,

The job I showed works fine with DFSORT which supports JKFROM.

However, the SYT messages indicate you're using Syncsort, not DFSORT.
Syncsort does not support JKFROM.
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 RC query -Time column CA Products 3
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
Search our Forums:

Back to Top