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

LOW VALUES as a KEY


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
juares castro

New User


Joined: 04 May 2012
Posts: 34
Location: Brazil

PostPosted: Sat Apr 07, 2018 1:06 am
Reply with quote

Hi everyone!
Could we use LOW VALUES as a key in DB2 table?
We have a flat file we use to REPRO to a VSAM file, but we will convert our system to Linux/Java and need to use now DB2 tables. First record has different information and it has in first 11 bytes as LOW VALUES as a key.

Thanks in advance.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1015
Location: Richmond, Virginia

PostPosted: Sat Apr 07, 2018 2:38 am
Reply with quote

You could have tried it to see what happened. This is the best way to learn anything.
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Moderator


Joined: 14 Mar 2007
Posts: 10712
Location: italy

PostPosted: Sat Apr 07, 2018 3:10 am
Reply with quote

nowhere in the manuals for any data-base/data-management system
there are warnings abut the allowed/forbidden values of a key
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8569
Location: Dubuque, Iowa, USA

PostPosted: Sat Apr 07, 2018 3:19 am
Reply with quote

Quote:
LOW-VALUES can be anything.
When you say Key, I take it as Primary Key in DB2 then Nulls are not allowed.
First, LOW-VALUES is a COBOL term that refers to a field with all bits set to 0 -- X'0000.....00' (however long it is). It CANNOT be "anything" -- it is a specific bit pattern and only that bit pattern.

Second, LOW-VALUES are not NULL. NULL requires a separate field from the data to denote that the field is NULL. Even if the data field is LOW-VALUES, that does not mean the value is NULL -- only having the indicator field set will mean the value is NULL.
Back to top
View user's profile Send private message
juares castro

New User


Joined: 04 May 2012
Posts: 34
Location: Brazil

PostPosted: Mon Apr 09, 2018 6:57 pm
Reply with quote

Thanks to everyone!

And, Phrzby Phil, my understanding about the forum is share what we know and about our experience to help anybody. Indeed I could try first, but I have chosen searching here. It is a good manner to me to learn something.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1015
Location: Richmond, Virginia

PostPosted: Mon Apr 09, 2018 7:19 pm
Reply with quote

Juares -

I certainly agree with your comments about sharing. My intention is merely to encourage anyone new to technology (and this includes experts on this excellent forum who may from time to time be using certain tools for the first time) to learn as much as possible by experimenting. The lessons will stick much more rapidly and solidly this way.

When I was getting more involved with DB2, I had a sandbox set up for me where I could play around and try all kinds of stuff (e.g., experimenting with the so-called null indicator - "so-called" because if I remember, it indicates other stuff as well. Anyone wanting to clarify this please do.)

This also provided me with a collection of experiments and tests i could then build on and share with my team.

I'm retired now, but I wish you Good Luck and Happy Hunting.

Live Long and Prosper.
Back to top
View user's profile Send private message
juares castro

New User


Joined: 04 May 2012
Posts: 34
Location: Brazil

PostPosted: Mon Apr 09, 2018 10:09 pm
Reply with quote

Thanks Phrzby Phil !
Long life for You too.
Back to top
View user's profile Send private message
juares castro

New User


Joined: 04 May 2012
Posts: 34
Location: Brazil

PostPosted: Mon Apr 09, 2018 11:36 pm
Reply with quote

As I said before, we will convert our process to JAVA/LINUX and the current file is a VSAM, that is not supported in LINUX. And in this file first record has LOW-VALUES (X'0000...00') as key. That was my question.
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Moderator


Joined: 14 Mar 2007
Posts: 10712
Location: italy

PostPosted: Tue Apr 10, 2018 11:24 am
Reply with quote

as already told ...
the data(base) management systems DO NOT CARE about the values of the keys
so any discussion why the TS want to use a "low value" is just a completely waste of time.

the topic has been pruned of the irrelevant posts
Back to top
View user's profile Send private message
juares castro

New User


Joined: 04 May 2012
Posts: 34
Location: Brazil

PostPosted: Tue Apr 10, 2018 10:22 pm
Reply with quote

Enrico, i was just responding Phrzby Phi.
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Moderator


Joined: 14 Mar 2007
Posts: 10712
Location: italy

PostPosted: Tue Apr 10, 2018 11:36 pm
Reply with quote

I was not commenting Your posts,
but the posts of the people questioning the why of a key containing low values
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts a copybook getting improper values in... COBOL Programming 7
No new posts JDBC Driver -Default Values DB2 1
No new posts Not able to view the values of variab... CA Products 1
No new posts ADD/ SUB Values DFSORT/ICETOOL 7
No new posts position, start pos, length of column... SYNCSORT 14
Search our Forums:

Back to Top