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: 22
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: 212
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: 1247
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: 212
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 Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm
No new posts Format Last Record differently from r... Learncoholic DFSORT/ICETOOL 5 Tue Oct 24, 2017 12:01 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am

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