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 inlcude overlay

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
venkatatcts

New User


Joined: 16 Mar 2009
Posts: 55
Location: India

PostPosted: Wed Jul 14, 2010 9:13 pm    Post subject: syncsort inlcude overlay
Reply with quote

Hi,

I have two file file1 and file2. I am matching two files with three keys,

File 1 key 1 = File 2 key 1
File 1 key 2 = File 2 key 2
File 1 key 3 = File 2 key 3

Using the below sort, i joined the three keys. But After a match happens I need to overlay a record from file 2 position (25,3) to file 1 (205,3) in the include section. When there is no match I need to write it to mot condition. Finally I will merge this two files.

Apart from how to write a separate file which will have changed record details. I can write a separate for the matched records to extract the keys and other fileds with inlcuding some conditions. But is it possible to do that in this step itself.

JOINKEYS FILES=F1,FIELDS=(1,7,A,9,3,A,200,3,A)
JOINKEYS FILES=F2,FIELDS=(1,7,A,8,3,A,20,3,A)
JOIN UNPAIRED,F1,F2
REFORMAT FIELDS=(F1:1,933,F2:1,30)
SORT FIELDS=COPY,
DYNALLOC=(SYSDA,32),SIZE=E50000
OMIT COND=(1,10,CH,EQ,C' ')
OUTFIL FILES=(OUT),
INCLUDE=(1,7,CH,EQ,934,7,CH,AND,9,3,CH,EQ,941,3,CH,AND,200,3,EQ,953,3),

After a match happens I need to overlay a record from file 2 position (25,3) to file 1 (205,3) in the include section

Change file

OUTREC=(1,933)
OUTFIL FILES=(1),
OMIT=(1,7,CH,EQ,934,7,CH,AND,9,3,CH,EQ,941,3,CH,AND,200,3,EQ,953,3), OUTREC=(1,933)

Thanks,
Venkatraman B
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2284
Location: @my desk

PostPosted: Thu Jul 15, 2010 11:33 am    Post subject:
Reply with quote

venkatatcts,

It's not clear what you're trying to do. How many output files are there? If there's a match you need to overlay a field from file-2 record to file-1 record. What about the unmatched records from both the files which seem to have different lengths since you are taking 933 bytes from file-1 and 30-bytes from file-2. How do you want these records in output?
Quote:
Apart from how to write a separate file which will have changed record details.
Is this file different from what you explained above?
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 Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
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