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
 

 

Joinkeys with decimal

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

New User


Joined: 06 Sep 2006
Posts: 37
Location: United States

PostPosted: Fri Feb 10, 2017 4:46 am    Post subject: Joinkeys with decimal
Reply with quote

Hi,
Please help me the syntax for Joinkeys with decimal

File1 ...length 116 FB with keys at starting position 7(Decimal 11)
File2 ...length 46 FB with keys at starting position 15(Decimal 11)

I need to match both this files on above keys and write output as ( complete records from file1(length:116) and on file2: starting position 5(Decimal 18)).

Please help with syntax. Thanks
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Feb 10, 2017 6:18 am    Post subject: Reply to: Joinkeys with decimal
Reply with quote

It doesn't matter if the keys are decimal, it only matters that they are the same length, and the same data-type. The comparison is "match or not", the convention used to represent a value by a particular bit-setting is irrelevant.

The comparisons are effectively BI or CH, but that makes no difference to anything. Your JOINKEYS will work fine with "decimal" values as the keys. Whatever it is the "decimal" means to you. It just doesn't matter for the JOINKEYS, which just needs match or not.
Back to top
View user's profile Send private message
sergeyken

New User


Joined: 29 Apr 2008
Posts: 80
Location: Maryland

PostPosted: Sat Feb 11, 2017 2:43 am    Post subject:
Reply with quote

The key fields from JOINKEYS statements are considered as hexadecimal strings of the same length, since only comparison on EQUAL are performed to join keys.

"Decimal 11" fields have the length ((11 + 1) % 2) = 6 bytes

You must code
JOINKEYS ...FIELDS=(7,11,A)
JOINKEYS ...FIELDS=(15,11,A)

(Option "A" is ignored unless SORTED is specified)
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Sat Feb 11, 2017 4:34 am    Post subject: Reply to: Joinkeys with decimal
Reply with quote

What do you mean the A is ignored unless SORTED is specified?

SORTED tells DFSORT that the data is already in sequence, so the sub-task can run a COPY operation.

Even then the A is still relevant, as unless NOSEQCK is specified, there is sequence checking, for which you need to know whether the sequence is A(scending) or D(escending).

If you don't specify SORTED, the A (or D) is 100% and utterly vital. If you are going to SORT something, you need to know the "direction".
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 Joinkeys with condition scdinesh DFSORT/ICETOOL 10 Tue Feb 14, 2017 12:20 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Joinkeys operation betwen VB and FB file Susanta SYNCSORT 4 Sun Sep 25, 2016 9:49 pm


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