×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Join Error

Join Error

Join Error

(OP)
Hello,

I build a join like this:

First I join a hold file with a DB2 table, then I Join the same Hold file with another Hold File:


JOIN FIELD1 IN MYNAMES TO FIELD2 IN DB2TABLE AS J1
END
JOIN FIELD3 IN MYNAMES TO ALL FIELD3 IN MYHOLD AS J2
END


(FIELD1 and FIELD2, FIELD3 and FIELD4 have the same format, I checked that with ? HOLD)

I then get the following error:

(FOC1070) VALUE FOR JOIN 'FROM' FIELD OUT OF SEQUENCE. RETRIEVAL ENDED.

I don't quiet understand what that means. Because in a similar join I didn't sort the joning fields neither and that join worked. Can anybody explain?

Regards,
Eva

RE: Join Error

When you JOIN to a HOLD file (which is a sequential file), you must provide the 'from' values in ascending order, and the order of the 'to' values in the HOLD file must also be in ascending order. This is because, as a sequential file, there's no 'direct access' method, so we go through the file SEQUENTIALLY, and NEVER BACK UP.

So, the error can be from one of several causes:

1. 'FROM' values are not presented in ascending order

2. 'TO' values are not in ascending order

There's also the issue of duplicate values. You can ONLY have duplicates in ONE of the files (either FROM or TO). If in the FROM file, you can ONLY have a UNIQUE JOIN (so we don't have to back up). If duplicates exist in the TO file, you can't have duplicates in the FROM file, as, again, we'd have to back up.

RE: Join Error

(OP)
Hi focwizard,

thanx for the information. I found also out that the from an to field have to be real database fields and not generated by a define like I did. But I will keep your tip in mind the next time I'd like to join two hold files.

Best regards
Eva

RE: Join Error

Actually, only the 'TO' field needs to be a real database field. The 'FROM' field can be DEFINEd, but you need to use a slightly diferent syntax in the JOIN (using 'WITH realfield'), to indicate that the field is a DEFINE and not a real field.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close