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
 

 

Syncsort Copying Common Data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort Copying Common Data
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 Moderator


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

PostPosted: Wed Feb 02, 2011 2:52 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed Feb 02, 2011 8:30 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed Feb 02, 2011 9:36 am    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Wed Feb 02, 2011 9:49 am    Post subject:
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: 1703
Location: Australia

PostPosted: Wed Feb 02, 2011 9:53 am    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Wed Feb 02, 2011 10:32 am    Post subject:
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    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Thu Feb 03, 2011 4:12 am    Post subject:
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    Post subject: ok
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am


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