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
 
Join keys for VB file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Thu Oct 01, 2015 7:32 pm    Post subject: Join keys for VB file
Reply with quote

Hi,

I have a input file 1 which is a VB file of length 10500. The field that i want compare is at pos 15 and in BINARY format of length 4 bytes.
Input file 2 which of length 9 bytes and in numeric format.

I am trying to use JOINKEYS to extract data from file 1 using the data from file 2.

I have given the sort card as follows.
Code:

//SYSIN DD *
  SORT FIELDS=COPY
  JOINKEYS FILE=F1,FIELDS=(10505,9,A),TYPE=V
  JOINKEYS FILE=F2,FIELDS=(1,9,A)
  REFORMAT FIELDS=(F1:1,4,5)
//JNF1CNTL DD *
   INREC OVERLAY=(10505:19,4,BI,TO=ZD,LENGTH=9)


but still i not getting the records in my output file.
Can someone tell what is wrong in this ?
Back to top
View user's profile Send private message

sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 578
Location: USA

PostPosted: Thu Oct 01, 2015 9:04 pm    Post subject:
Reply with quote

Use Join Indicator and write unmatched record to a research file and post your result showing matchind field from both the files along with join indicator value.

Since you are only writting F1 records, JOIN UNPAIRED,F1 is worth considering.

Thanks,
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1818
Location: NY,USA

PostPosted: Thu Oct 01, 2015 10:27 pm    Post subject:
Reply with quote

Try converting Numeric to BI and make a match, Something is not good with the offset it seems.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Fri Oct 02, 2015 12:11 am    Post subject: Reply to: Join keys for VB file
Reply with quote

It is traditional, when extending a V-type record, to do so at the beginning, rather than making all the records on the file the same size (or using VLTRIM having stripped off the extended data).

In this case I'd go with Rohit. Your F2 data is just the matching number. Make it binary, and don't touch the main record.

If the data (either) is already in key sequence, specify SORTED,NOSEQCK on the JOINKEYS for that file.

Can you paste the output from the step, please?
Back to top
View user's profile Send private message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Fri Oct 02, 2015 1:35 am    Post subject: Reply to: Join keys for VB file
Reply with quote

Thanks Guys,

I tried what Rohit suggested and it worked perfectly.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Updating data from one file to other!!! Vignesh Sid SYNCSORT 1 Mon Nov 06, 2017 2:42 pm
This topic is locked: you cannot edit posts or make replies. Need help how to pass the ESP variabl... Venkichaitu JCL & VSAM 12 Thu Nov 02, 2017 3:53 am
This topic is locked: you cannot edit posts or make replies. Comparing current time with the time ... arunsoods SYNCSORT 1 Mon Oct 30, 2017 4:07 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am

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