Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

can we reformat a superc output file by syncsort
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
saujanya_2831

New User


Joined: 09 May 2007
Posts: 27
Location: pune

PostPosted: Tue Jun 05, 2007 11:28 am    Post subject: can we reformat a superc output file by syncsort
Reply with quote

i have a output file from superc as below

ISRSUPC - MVS/PDF FILE/LINE/WORD/BYTE/SFOR COMPARE UTILITY- ISPF F
NEW: A3AASSR.MP07.AU190D3.G2074 OLD: A3AASS

LISTING OUTPUT SECTION (LINE COMPARE)

ID SOURCE LINES
----+----1----+----2----+----3----+----4----+----5----+----6----+---


D - 0705302196590376 3123460875 00000000000930019594200103803

D - 0705302562172386 7026834394 00000000000630019562700135303


D - 0705303026773000 5054210564 00000000002630019353000344903


D - 0705306082690777 2629494787 00000000000520020063200034703

but i cant use it in a procedure so can i reformat the ouput file and get the output as

0705302196590376 3123460875 00000000000930019594200103803
0705302562172386 7026834394 00000000000630019562700135303
0705303026773000 5054210564 00000000002630019353000344903
0705306082690777 2629494787 00000000000520020063200034703
0705307572241503 9104715683 00000000000090020095800002003
0705308452974113 9194530865 00000000001050019490300211703

so can any one help me with this because i dont have any manuals of synsort or dfsort.any small suggestion will also be of great help .

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

krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Jun 05, 2007 12:21 pm    Post subject:
Reply with quote

saujanya_2831
check this code
Code:
//*******************************************************               
//STEP1    EXEC PGM=ICEMAN                                             
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD *                                                         
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
ID SOURCE LINES                                                         
 D - 0705302196590376 3123460875 00000000000930019594200103803           
 D - 0705302562172386 7026834394 00000000000630019562700135303           
 D - 0705303026773000 5054210564 00000000002630019353000344903           
 D - 0705306082690777 2629494787 00000000000520020063200034703           
/*                                                                     
//SORTOUT  DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
           SORT FIELDS=COPY                                             
           INCLUDE COND=(2,3,CH,EQ,C'D -')                             
           INREC FIELDS=(1:6,60)                                       
/*                                                                     


Sortout will contain
Code:
0705302196590376 3123460875 00000000000930019594200103803
0705302562172386 7026834394 00000000000630019562700135303
0705303026773000 5054210564 00000000002630019353000344903
0705306082690777 2629494787 00000000000520020063200034703


DFSORT/ICETOOL reference material available @ http://ibmmainframes.com/viewtopic.php?t=1348
Back to top
View user's profile Send private message
saujanya_2831

New User


Joined: 09 May 2007
Posts: 27
Location: pune

PostPosted: Tue Jun 05, 2007 12:26 pm    Post subject: we are using only Syncsort i think
Reply with quote

thanks for the link but we are using only Syncsort i guess because till now i havent seen dfsort in any proc.so can you please send me a link for Syncsort.

thanks
Back to top
View user's profile Send private message
saujanya_2831

New User


Joined: 09 May 2007
Posts: 27
Location: pune

PostPosted: Tue Jun 05, 2007 2:09 pm    Post subject: icetool or dfsort
Reply with quote

Hi krisprems ,

my record length is 90 and i dont know whether my shop has dfsort or icetool how to find it out .actually iam comparing two files and getting duplicates in third file by using superc .previously we used comparex for the same.The ouptput of superc has listing someting like below 2 recs

D - 0705302196590376 3123460875 00000000000930019594200103803 CMD DA 8 DEL= 1 49746 49746
D - 0705302562172386 7026834394 00000000000630019562700135303 CMD DA 8 DEL= 1 58961 58962

and i need to get rid of all those listing of superc and get only records in output somehow like below

0705302196590376 3123460875 00000000000930019594200103803 CMD DA
0705302562172386 7026834394 00000000000630019562700135303 CMD DA

.you have given the code for ICETOOL?.so any sort of suggestion on this would be fine.

thanks
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Jun 05, 2007 3:11 pm    Post subject: Re: we are using only Syncsort i think
Reply with quote

saujanya_2831 wrote:
so can you please send me a link for Syncsort.
You need to get in touch with SyncSort Mainframe Support at zos_tech@syncsort.com (from your company email) and tell them Alissa Margulies sent you.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Jun 05, 2007 5:12 pm    Post subject:
Reply with quote

saujanya_2831
Try this code it should work for you
Code:
//*******************************************************               
//STEP1    EXEC PGM=SORT                                           
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD dsn=i/p
//SORTOUT  DD dsn=o/p
//SYSIN    DD *                                                         
           SORT FIELDS=COPY                                             
           INCLUDE COND=(2,3,CH,EQ,C'D -')                             
           INREC FIELDS=(1:6,64)                                       
/*   
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 Jun 11, 2007 8:58 am    Post subject: to get only matching and unmatiching records.
Reply with quote

hi all,

as mention above we can only get the records which has 'D' in field 2 and similarly can write a step to get 'I' records... my concern is that i would need the matching records in file A and B.. the output is shown below..

D - 2483644000 563 R9030605037 9ZR 1MB 3 .24 04/03/
2483644500 174 R9050609082 9ZW 1MB 9 -9.27 06/01
2483711940 940 R9050609105 9ZW E6KJX 5 -.55 06/01
D - 2483712379 440 R9030607444 9LP MWH 1 2.78 06/01/
2483713770 908 R9050609107 9ZW 1MB 7 -7.21 06/01
I - 2486283943 543 R9050609985 9ZW 1MB 1 -1.03
D - 2485408228 544 R9030607542 9ZR 1MB 4 .32 04/03/


if i use INCLUDE COND=(2,3,CH,EQ,C' ') then i get unwanted fields also

please give ur suggestion to avoid this..
Back to top
View user's profile Send private message
saif_mf
Currently Banned

New User


Joined: 09 May 2007
Posts: 4
Location: bangalore

PostPosted: Mon Jun 11, 2007 12:14 pm    Post subject: its working
Reply with quote

hi krisprems,
i have tried in syncsort by modifying include cond a little bit iam getting the desired output.

SORT FIELDS=COPY
INCLUDE COND=(1,3,CH,EQ,C'I -',OR,1,3,CH,EQ,C'D -')
INREC FIELDS=(1:5,90)

//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD dsn=i/p
//SORTOUT DD dsn=o/p
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(2,3,CH,EQ,C'D -')
INREC FIELDS=(1:6,64)
/* [/code][/quote]
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Mon Jun 11, 2007 3:22 pm    Post subject: Re: to get only matching and unmatiching records.
Reply with quote

loga_nathan_m wrote:

my concern is that i would need the matching records in file A and B..

I think SUPERC statics do not show the common-records. Use SORT instead to get common records.
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 Jun 11, 2007 5:14 pm    Post subject:
Reply with quote

i need common record, unmatching records in file 1 and unmatching records in file 2 in different file.. hence SUPERC is best suited.
by the above method (using INCLUDE COND) i was able to get unmatching record in different file.. but the matching record or common record, i was not able to strip exactly...

any way thanks for u suggestion.

regards,
Loga.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Mon Jun 11, 2007 6:48 pm    Post subject:
Reply with quote

loga_nathan_m wrote:
i need common record, unmatching records in file 1 and unmatching records in file 2 in different file..

Hi,

It means, you have two input files, say File-A & File-B & you need two different files (A-B) & (B-A) in output, where
(A-B)= Records only in A not in B
(B-A)= Records only in B not in A
Right?
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Mon Jun 11, 2007 8:26 pm    Post subject:
Reply with quote

loga_nathan_m

Quote:
my concern is that i would need the matching records in file A and B.. the output is shown below..

Can you use ICETOOL?
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Mon Jun 11, 2007 8:47 pm    Post subject:
Reply with quote

saif_mf

Code:
SORT FIELDS=COPY
INCLUDE COND=(1,3,CH,EQ,C'I -',OR,1,3,CH,EQ,C'D -')
INREC FIELDS=(1:5,90)

Yes your sort card does work but remember that it is not separating all the 'D -' and 'I -' records....
The record is either 'I -' or 'D -' its written into a single o/p file.

If the requirement is so, then no probs!
Back to top
View user's profile Send private message
loga_nathan_m

New User


Joined: 07 Jun 2007
Posts: 40
Location: India

PostPosted: Tue Jun 12, 2007 5:28 pm    Post subject:
Reply with quote

hi anuj,

yes u are correct, i needed 3 files, 2 as u have mentioned and the third one with common records
(A common B) = common records in A&B in a third file.

i was able to get them.. but had to do some manual deleting of records.

i used the below code to get the third file
Code:

INCLUDE COND=(2,3,CH,EQ,C'   ')


thanks a lot for ur suggestion.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Tue Jun 12, 2007 7:28 pm    Post subject:
Reply with quote

Hello,

As this is a Syncsort question, i suspect this
Quote:
Can you use ICETOOL?
may not work. It is worth a try, but don't be surprised if it will not do what you want.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Tue Jun 12, 2007 8:41 pm    Post subject:
Reply with quote

Loga,

Good to know that you got the desired result. icon_smile.gif

But now I got a query:
In your JCL the input to SORT is the output of SUPERC. Let's we've two input files as:
HLQ.FIRST.FILE
Code:
111 $$$$$
222 AAAAA
444 FFFFF
555 GGGGG
888 CCCCC

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


This is presumed that both the files are in same sort order when they were given as input to SUPERC.
Used the following JCL:
Code:
//JOBCARD                                                   
//SUPERC  EXEC PGM=ISRSUPC,                           
//            PARM=(DELTAL,LINECMP,                   
//            '',                                     
//            '')                                     
//NEWDD  DD DSN=HLQ.FIRST.FILE,                       
//          DISP=SHR                                 
//OLDDD  DD DSN=HLQ.SECOND.FILE,                     
//          DISP=SHR                                 
//OUTDD  DD DSN=HLQ.SUPERC.OUT,DISP=(NEW,CATLG,CATLG)
/*                                                   
//*                                                   
Output is HLQ.SUPERC.OUT, which'll be input to SORT in your case
Code:
I - 111 $$$$$
D - 111 BBBBB
I - 222 AAAAA
D - 333 DDDDD
             
I - 555 GGGGG
I - 888 CCCCC
D - 555 HHHHH


Now question is in the input to SORT, I don't have common record, 444 FFFFF, then how do you get this record in the output of SORT?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Tue Jun 12, 2007 9:18 pm    Post subject:
Reply with quote

dick scherrer wrote:
Hello,
As this is a Syncsort question, i suspect this
Quote:
Can you use ICETOOL?
may not work. It is worth a try, but don't be surprised if it will not do what you want.


It does work with SyncSort as well. We need to replace DD name DFSMSG of ICETOOL with SSMSG , SYNCTOOL will be invoked in back-end. For reference purpose following JCL can be used as an example:
JCL:
Code:
//SYNCSORT  EXEC PGM=ICETOOL                                         
//TOOLMSG DD SYSOUT=*                                                 
//SSMSG   DD SYSOUT=*                                                 
//IN1     DD DSN=HLQ.FIRST.FILE,DISP=(SHR,KEEP,KEEP)                 
//IN2     DD DSN=HLQ.SECOND.FILE,DISP=(SHR,KEEP,KEEP)                 
//TMP1    DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=SYSDA
//OUT     DD DSN=HLQ.OUT.FILE1,DISP=(NEW,CATLG,CATLG)                 
//TOOLIN  DD *                                                       
  COPY FROM(IN1) TO(TMP1) USING(CPY1)                                 
  COPY FROM(IN2) TO(TMP1) USING(CPY2)                                 
  SPLICE FROM(TMP1) TO(OUT) ON(1,3,CH) WITH(11,5)                     
//CPY1CNTL DD *                                                       
  OUTREC FIELDS=(1:1,3,5:5,5,11:5X)                                   
/*                                                                   
//CPY2CNTL DD *               
  OUTREC FIELDS=(1:1,3,11:5,5)
/*                           


TOOLMSG displays the following:
Code:

SYT000I  SYNCTOOL RELEASE 1.5.1 - COPYRIGHT 2004  SYNCSORT
SYT001I  INITIAL PROCESSING MODE IS "STOP"                 
SYT002I  "TOOLIN" INTERFACE BEING USED                     
                                                           
           COPY FROM(IN1) TO(TMP1) USING(CPY1)             
SYT020I  SYNCSORT CALLED WITH IDENTIFIER "0001"           
SYT030I  OPERATION COMPLETED WITH RETURN CODE 0           
                                                           
           COPY FROM(IN2) TO(TMP1) USING(CPY2)             
SYT020I  SYNCSORT CALLED WITH IDENTIFIER "0002"           
SYT030I  OPERATION COMPLETED WITH RETURN CODE 0           
                                                           
           SPLICE FROM(TMP1) TO(OUT) ON(1,3,CH) WITH(11,5)
SYT020I  SYNCSORT CALLED WITH IDENTIFIER "0003"           
SYT031I  NUMBER OF RECORDS PROCESSED: 000000000000009     
SYT026I  NUMBER OF SELECTED RECORDS: 000000000000003       
SYT030I  OPERATION COMPLETED WITH RETURN CODE 0           
                                                           
SYT004I  SYNCTOOL PROCESSING COMPLETED WITH RETURN CODE 0 
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Tue Jun 12, 2007 9:47 pm    Post subject:
Reply with quote

Hello,

Yes it will run - it will not always work.

When you are a Syncsort installation and EXEC PGM=ICETOOL, it is dynamically replaced with Synctool (it is an alias) that does not have all of the features that ICETOOL has.

As i said earlier, worth a try, but not to be surprised if you do something that is a working ICETOOL example that abends or runs wrong on the Syncsort system.

SYNCTOOL is not covered by standard, distributed documentation yet - it was provided to ease transition from DFSORT for sites that chose to switch to Syncsort. It was implemented to use the same syntax as ICETOOL, but ICETOOL has had enhancements since the original SYNCTOOL was released. It is my understanding that a new release and documentation for SYNCTOOL is planned for early next year (2008).
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Wed Jun 13, 2007 5:24 pm    Post subject:
Reply with quote

dick scherrer wrote:

When you are a Syncsort installation and EXEC PGM=ICETOOL, it is dynamically replaced with Synctool (it is an alias) that does not have all of the features that ICETOOL has.


Yeah Dick,

I don't have an official-documentation on SYNCTOOL & I can know about different feactures of it.. only by experiment. As SPLICE work on SyncSort Sites while PARSE doesn't.
JCL provided by me will work for OPs' requirement(with some modifications), yeah it's not necessaary that all the other feactures of ICETOOL must be available in SYNCTOOL as well, it can only be said after official document release. Frank takes AD here.

P.S.:AD- advance, as in the game of Lawn-Tenis. icon_smile.gif
Back to top
View user's profile Send private message
saujanya_2831

New User


Joined: 09 May 2007
Posts: 27
Location: pune

PostPosted: Sat Jun 23, 2007 11:10 am    Post subject: Can i use Syntool and compare 2 files for non matching recs
Reply with quote

Hi anuj,
actually i have used superc in one step and syncsort in other step to get the desired output as shown in first page that is comparing two recs and getting non matching recs .but if i can do it in single step using syncsort that would be good. is it possible to do with synctool.as you suggested .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 1 Fri Dec 02, 2016 9:47 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us