IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Joinkeys with decimal


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
scdinesh

New User


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

PostPosted: Fri Feb 10, 2017 4:46 am
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Feb 10, 2017 6:18 am
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

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Sat Feb 11, 2017 2:43 am
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Feb 11, 2017 4:34 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
No new posts Need Help with Packed Decimal Signs DFSORT/ICETOOL 4
Search our Forums:

Back to Top