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

Syncsort Copying Common Data


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

New User


Joined: 26 Nov 2010
Posts: 30
Location: Hyderabad

PostPosted: Tue Feb 01, 2011 7:07 pm
Reply with quote

Please help me out in solving this query:
I have two datasets:
I need to copy common records into third file .
I have searched a lot but couldnot find this solution.
I found that uncommon were copied into third file but i need common to be copied into third file.
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: Wed Feb 02, 2011 2:52 am
Reply with quote

Jaffar Hussain,

It's not clear from you description what you want to do exactly.

Please show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example.

Also, run this job and show the //SYSOUT messages you receive, so I can see what level you're at:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
RECORD
//SORTOUT DD DUMMY
//SYSIN    DD    *
    OPTION COPY
/*
Back to top
View user's profile Send private message
jaffarhussain

New User


Joined: 26 Nov 2010
Posts: 30
Location: Hyderabad

PostPosted: Wed Feb 02, 2011 8:08 am
Reply with quote

Thanks for your reply.
Input data of file 1 has:
1542124abcdefadmin18071988250009521022154
1002124sdgfcdefHR181219882507895210284121

Input data of file 2 has :
1542124abcdefadmin18071988250009521022154
15477774fdjkgefhr10071990300009521022584

first 7 fields is empid based on that we need to compare and if match need to put it into third file.

Output should be:

1542124abcdefadmin18071988250009521022154
like this all matching records.

As this is the common record in both

LRECL: 80
RECFM: FB

I havenot run the job at all because i have no idea what to use, so thats why i am asking how to solve this using which sort or if you have the code please let me know or any link.
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: Wed Feb 02, 2011 8:30 am
Reply with quote

Hello,

You need to run and post the output of the job Frank provided. . .
Back to top
View user's profile Send private message
jaffarhussain

New User


Joined: 26 Nov 2010
Posts: 30
Location: Hyderabad

PostPosted: Wed Feb 02, 2011 9:19 am
Reply with quote

Sorry I dint get you .
In th code posted by frank its just copying records .
But i need to copy the common records.
So I should implement some condition.
So which condition should i use INREC fields or OUTREC fields or control cards etc like that.
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: Wed Feb 02, 2011 9:36 am
Reply with quote

Hello,

Quote:
In th code posted by frank its just copying records .
The reason Frank requested this is to see which level of the sort product is being used. The copy means nothing. The informational messages (including the message ids) are needed to proceed.

Just run the job and post the informational output.
Back to top
View user's profile Send private message
jaffarhussain

New User


Joined: 26 Nov 2010
Posts: 30
Location: Hyderabad

PostPosted: Wed Feb 02, 2011 9:45 am
Reply with quote

1 SYNCSORT FOR Z/OS 1.3.2.0R U.S. PATENTS: 4210961, 5117495 (C) 2007 SYNCSORT INC. DATE=2011
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 7D972, MODEL 2097 710
SYSIN :
OPTION COPY
WER276B SYSDIAG= 591012, 2023107, 2023107, 2443725
WER164B 7,408K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 272K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER110I SORTOUT : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER410B 5,868K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 156K BYTES USED
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER416B BSAM WAS USED FOR SORTIN
WER416B BSAM WAS USED FOR SORTOUT
WER054I RCD IN 1, OUT 1
WER169I RELEASE 1.3 BATCH 0493 TPF LEVEL 2.0
WER052I END SYNCSORT - ACP658Q8,S1,,DIAG=8000,428E,A8AE,0064,C842,6D82,2AE8,4C62

The SYSOUT generated this info.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Feb 02, 2011 9:49 am
Reply with quote

Hi,

also answer this from Frank
Quote:
If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example.



Gerry
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Feb 02, 2011 9:53 am
Reply with quote

Hi,

you are using SYNCSORT and not DFSORT which Frank supports.


Gerry
Back to top
View user's profile Send private message
jaffarhussain

New User


Joined: 26 Nov 2010
Posts: 30
Location: Hyderabad

PostPosted: Wed Feb 02, 2011 10:26 am
Reply with quote

In both the input files it doesnot have duplicate records.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Feb 02, 2011 10:32 am
Reply with quote

Hi,

here is an example of what you need :-
Code:
//FIRST    EXEC PGM=SYNCTOOL                                       
//IN1      DD DSN=file1                                           
//         DD DSN=file2                                           
//FIRST    DD SYSOUT=*                                             
//TOOLMSG  DD SYSOUT=*                                             
//DFSMSG   DD SYSOUT=*                                             
//TOOLIN   DD *                                                   
  SELECT FROM(IN1) TO(FIRST) ON(1,7,CH) FIRSTDUP                 
/*                                                                 


Gerry
Back to top
View user's profile Send private message
jaffarhussain

New User


Joined: 26 Nov 2010
Posts: 30
Location: Hyderabad

PostPosted: Wed Feb 02, 2011 10:48 am
Reply with quote

Thank you very much Gcicchet

icon_biggrin.gif
Back to top
View user's profile Send private message
jaffarhussain

New User


Joined: 26 Nov 2010
Posts: 30
Location: Hyderabad

PostPosted: Wed Feb 02, 2011 11:07 am
Reply with quote

If we have duplicate records in each file then will the same jcl works.
Or need to modifying anything?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Feb 03, 2011 4:12 am
Reply with quote

Hi,

it will not work without eliminating the duplicate records in each file.


Gerry
Back to top
View user's profile Send private message
jaffarhussain

New User


Joined: 26 Nov 2010
Posts: 30
Location: Hyderabad

PostPosted: Thu Feb 03, 2011 10:14 am
Reply with quote

ok
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 Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top