Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Matching and unmatched records!!

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
Vignesh Sid

New User


Joined: 04 Sep 2017
Posts: 32
Location: India

PostPosted: Thu Nov 09, 2017 11:22 am    Post subject: Matching and unmatched records!!
Reply with quote

Hi all,

I have two input files of FB. Syncsort is the product I use.

I need to write the matched and unmatched records in file 2 in different files.

I used the below code:

Code:
//S1     EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTJFN1 DD DSN=Input.File1
//SORTJNF2 DD DSN=Input.File2
//SORTOF01 DD DSN=Matched.Records
//SORTOF02 DD DSN=Unmatched.Records
//SYSIN    DD *
  JOINKEYS FILE=F1,FIELDS=(9,6,A,1,7,A)
  JOINKEYS FILE=F2,FIELDS=(1,6,A,7,7,A)
  JOIN UNPAIRED,F2                     
  REFORMAT FIELDS=(F2:1,80,F1:1,13)             
  SORT FIELDS=COPY
  OUTFIL FILES=01,INCLUDE=(81,13,CH,NE,C' '),BUILD=(1,80)
  OUTFIL FILES=02,SAVE,BUILD=(1,80)
/*


I got the desired output but I need to add a condition in the matched record file that it should include only records with "ACTION" starting from second position.

Is there any solution to acheive this?

Thanks!
Back to top
View user's profile Send private message

sergeyken

Active User


Joined: 29 Apr 2008
Posts: 298
Location: Maryland

PostPosted: Thu Nov 09, 2017 6:15 pm    Post subject: Re: Matching and unmatched records!!
Reply with quote

Vignesh Sid wrote:

Is there any solution to acheive this?

Yes, definitely there are many solutions, if you RTFM.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1275
Location: Israel

PostPosted: Thu Nov 09, 2017 6:57 pm    Post subject: Re: Matching and unmatched records!!
Reply with quote

Vignesh Sid wrote:
I need to add a condition in the matched record file that it should include only records with "ACTION" starting from second position.

You already have a condition to include only records with a value in pos 81-93 (matched records that are really matched?),
can't you just add another condition ?

if RTFM is too difficult*, google for "smart dfsort tricks" and download the pdf file.
It does not explain all the options but is filled with working examples for various specific purposes (like files with matching and non-matching records).
Most DFSORT commands and options work the same way in SYNCSORT (including ICETOOL and SYNCTOOL)

* No offense intended. The Programmer's Guide has more than 700 pages and it's really not easy to find the right page there.
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 298
Location: Maryland

PostPosted: Thu Nov 09, 2017 9:14 pm    Post subject: Re: Matching and unmatched records!!
Reply with quote

Marso wrote:
* No offense intended. The Programmer's Guide has more than 700 pages and it's really not easy to find the right page there.

There is "FIND" option in any manual reading tool. Unless you have a printed version of it! icon_lol.gif
Since approx. end of 1980s, or beginning of 1990s I did not read any manual from top to bottom. icon_kidra.gif
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm
No new posts how to add the amount for duplicate r... SRUTHI DRAVIDAMANI COBOL Programming 6 Wed Feb 21, 2018 7:21 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us