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

can we reformat a superc output file by syncsort


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

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jun 27, 2007 9:57 pm
Reply with quote

saujanya,

On first page you have shown the SUPERC output; for SORT solution, please provide the input/s & the desired output.

I hope you would like to have two outputs:
(A-B)= Records only in A not in B
(B-A)= Records only in B not in A

where A & B are two input files.

If yes, see the "Create files with matching and non-matching records" Smart DFSORT Trick at:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/

You need to do some modification in the above JCL, if you face some problem, please let us know.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jun 27, 2007 10:02 pm
Reply with quote

& yeah, above JCL is written for DFSORT forums, still must work with SyncSORT-sites as well, I've used that with little modification & it worked for me, give a try.
Back to top
View user's profile Send private message
student_mf

New User


Joined: 15 Jun 2007
Posts: 23
Location: pune

PostPosted: Wed Jun 27, 2007 10:49 pm
Reply with quote

Hi anuj,
iam trying to compare 2 files on few keys and get non-macthing records in third file .when i execute this jcl iam getting empty output file with following errors in sysout and RC=12

SPLICE FROM(TMP1) TO(OUT) ON(1,2,CH)
SYT053E "SPLICE" STATEMENT DOES NOT CONTAIN A "WITH" OPERAND
SYT030I OPERATION COMPLETED WITH RETURN CODE 12
ON(23,16,CH)
SYT048E STATEMENT DOES NOT BEGIN WITH A VALID OPERATOR

ON(39,15,CH)
SYT048E STATEMENT DOES NOT BEGIN WITH A VALID OPERATOR

ON(54,6,CH)
SYT048E STATEMENT DOES NOT BEGIN WITH A VALID OPERATOR


//SYNCSORT EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//SSMSG DD SYSOUT=*
//IN1 DD DSN=MT.testfile.T1,DISP=SHR
//IN2 DD DSN=MT.testfile.T2,DISP=SHR
//TMP1 DD DSN=&&TEMP1,DISP=(MOD,PASS),
// DCB=(RECFM=FB,LRECL=90,BLKSIZE=27000),
// SPACE=(27000,(15000,100),RLSE),UNIT=DISK
//OUT DD DSN=outfile.test.TSP,DISP=(,CATLG),
// DCB=(RECFM=FB,LRECL=90,BLKSIZE=27000),
// SPACE=(27000,(15000,100),RLSE),UNIT=DISK
//TOOLIN DD *
COPY FROM(IN1) TO(TMP1) USING(CPY1)
COPY FROM(IN2) TO(TMP1) USING(CPY2)
SPLICE FROM(TMP1) TO(OUT) ON(1,2,CH)
ON(3,4,CH)
ON(7,16,CH)
ON(23,16,CH)
ON(39,15,CH)
ON(54,6,CH)
ON(60,7,CH)
ON(81,1,CH)
//CPY1CNTL DD *
OUTREC FIELDS=(1:1,90)
/*
//CPY2CNTL DD *
OUTREC FIELDS=(1:1,90)
/*
//


the inputfiles are of format
0705299127390154 7575755631 00000000019100022515903811603 CM
0705300000000000 05013222216 00000000000230017023500000303 CM
0705300000000000 3052354611 00000000000080015175800006003 CM
0705300000000000 3052524370 00000000000080020190200005803 CM
0705300000000000 3052565309 00000000000450020120600060003 CM
0705300000000000 4134490030 00000000000530021461500315703 CM

and output should be
0705302196590376 3123460875 00000000000930019594200103803 CM
0705302562172386 7026834394 00000000000630019562700135303 CM
0705303026773000 5054210564 00000000002630019353000344903 CM
0705306082690777 2629494787 00000000000520020063200034703 CM

RECFM=FB,LRECL=91 FOR inputs and output files.
any suggestions
Back to top
View user's profile Send private message
student_mf

New User


Joined: 15 Jun 2007
Posts: 23
Location: pune

PostPosted: Thu Jun 28, 2007 11:56 am
Reply with quote

Hi anuj i have modified the //TOOLIN DD * as below but still not working
and iam getting following TOOLMSG

SYT053E "SPLICE" STATEMENT DOES NOT CONTAIN A "WITH" OPERAND
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 and output file is an empty file.

//TOOLIN DD *
COPY FROM(IN1) TO(TMP1) USING(CPY1)
COPY FROM(IN2) TO(TMP1) USING(CPY2)
SPLICE FROM(TMP1) TO(OUT) ON(1,2,CH) -
ON(3,4,CH) -
ON(7,16,CH) -
ON(23,16,CH) -
ON(39,15,CH) -
ON(54,6,CH) -
ON(60,7,CH) -
ON(81,1,CH)[/quote]

and even i have tried with the following
//TOOLIN DD *
COPY FROM(IN1) TO(TMP1) USING(CPY1)
COPY FROM(IN2) TO(TMP1) USING(CPY2)
SPLICE FROM(TMP1) TO(OUT) WITH(1,2) -
WITH(3,4) -
WITH(7,16) -
WITH(23,16) -
WITH(39,15) -
WITH(54,6) -
WITH(60,7) -
WITH(81,1)
//CPY1CNTL DD *
OUTREC FIELDS=(1:1,90)
/*
//CPY2CNTL DD *
OUTREC FIELDS=(1:1,90)
and iam getting empty output file and following TOOLMSG

SYT053E "SPLICE" STATEMENT DOES NOT CONTAIN AN "ON" OPERAND
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

so please suggest
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Jun 28, 2007 11:59 am
Reply with quote

student_mf

The error thrown, clearly states that the keyword WITH is missing in the SPLICE statement.
Quote:
SYT053E "SPLICE" STATEMENT DOES NOT CONTAIN A "WITH" OPERAND


For continuation of ON operator u should use the continuation symbol '-' like this
Code:
SPLICE FROM(TMP1) TO(OUT) ON(1,2,CH) -
  ON(3,4,CH) -
  ON(7,16,CH)  with(p,m) 



and regarding
Quote:
the inputfiles are of format

but you show only 1 file, where is the another?
What all fileds you want to join here?
What are the rules?
Intead of replying here, post it as a New Post
Back to top
View user's profile Send private message
student_mf

New User


Joined: 15 Jun 2007
Posts: 23
Location: pune

PostPosted: Thu Jun 28, 2007 12:36 pm
Reply with quote

Hi krisprems,
i want to compare 2 files based on few keys and if non-matchig record is found it should be outputted in third file .so is it possible to do it with synctool that is ice tool.please suggest.i have posted input files and output files as new topic .please suggest.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Jul 02, 2007 8:14 pm
Reply with quote

student_mf,

Sorry for a delayed reply, was away from net since some days.

In your JCL you are using multiple WITH & ON, do you want to compare files on differnet keys ?
However, you can try following JCL:
Code:
//STEP001 EXEC PGM=SYNCTOOL                                     
//TOOLMSG DD SYSOUT=*                                           
//DFSMSG  DD SYSOUT=*                                           
//IN1     DD DSN=HLQ.FIRST.FILE,DISP=SHR                       
//IN2     DD DSN=HLQ.SECOND.FILE,DISP=SHR                       
//T1      DD DSN=&&T1,UNIT=SYSDA,SPACE=(TRK,(5,5)),             
//           DISP=(MOD,PASS)                                   
//OUT12   DD DSN=HLQ.MATCHED.OUTPUT,DISP=(NEW,CATLG,DELETE)     
//OUT1    DD DSN=HLQ.ONLY.IN.IN1.OUT,DISP=(NEW,CATLG,DELETE)     
//OUT2    DD DSN=HLQ.ONLY.IN.IN2.OUT,DISP=(NEW,CATLG,DELETE)     
//TOOLIN  DD *                                               
  COPY FROM(IN1) TO(T1) USING(CTL1)                         
  COPY FROM(IN2) TO(T1) USING(CTL2)                         
  SPLICE FROM(T1) TO(OUT12) ON(1,3,CH) WITH(81,1) -         
  USING(CTL3) KEEPNODUPS                                     
/*                                                           
//CTL1CNTL DD *                                             
  INREC OVERLAY=(80:C'11')                                   
/*                                                           
//CTL2CNTL DD *                                             
  INREC OVERLAY=(80:C'22')                                   
/*                                                           
//CTL3CNTL DD *                                             
  OUTFIL FNAMES=OUT12,INCLUDE=(80,2,CH,EQ,C'12'),BUILD=(1,80)
  OUTFIL FNAMES=OUT1,INCLUDE=(80,2,CH,EQ,C'11'),BUILD=(1,80)
  OUTFIL FNAMES=OUT2,INCLUDE=(80,2,CH,EQ,C'22'),BUILD=(1,80)
/*                                                           


In above JCL,
HLQ.FIRST.FILE contains
Code:
111 $$$$$
222 AAAAA
444 FFFFF
555 GGGGG
888 CCCCC

HLQ.SECOND.FILE
Code:
111 BBBBB
333 DDDDD
444 FFFFF
555 HHHHH

Both the input files are of LRECL=80, Fixed-Block & there are no duplicate records in an individual file.OUT1 & OUT2 are the desired outpur for your query, OUT12 will have common records of both the files. If the above JCL does not work for you, please provide your both input files.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Jul 05, 2007 12:16 pm
Reply with quote

anuj_model
student_mf's question was considered under OFF TOPICS @
http://ibmmainframes.com/viewtopic.php?t=22316
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jul 05, 2007 2:38 pm
Reply with quote

Hi,

Thanks for redirecting.
By the way, you can call me Anuj. icon_smile.gif
Back to top
View user's profile Send private message
loga_nathan_m

New User


Joined: 07 Jun 2007
Posts: 40
Location: India

PostPosted: Mon Mar 24, 2008 1:53 pm
Reply with quote

hi all,

i have two files FILE1 and FILE2.
FILE1 contains a list of Telephone numbers(approx 600 records)
FILE2 is of length 200 bytes and contains some data along with Telephone numbers.(approx 33000 records)

Requirement:
If the TN from FILE1 matches with TN in FILE2 i want the entire record from FILE2 to be written on other file.

SUPERC shows me Inserted and Deleted lines but it does not give me the entire 200bytes of FILE2 (only 80 bytes displayed).
i want the entire record.

Kindly reply if u have answers...

thanks in advance.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Mar 25, 2008 6:47 am
Reply with quote

Hello,

I believe you will be more satisfied if you use your sort product rather than superc.

If you search in the DFSORT section you may find solutions like what you are looking for. If your system uses Syncsort, there are similar topics in the JCL section.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Wed Mar 26, 2008 12:05 am
Reply with quote

loga_nathan_m wrote:
Requirement:
If the TN from FILE1 matches with TN in FILE2 i want the entire record from FILE2 to be written on other file.

This sounds like a great candidate for SyncSort's JOIN feature.
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 Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top