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
 
LOW VALUES as a KEY

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
juares castro

New User


Joined: 04 May 2012
Posts: 23
Location: Brazil

PostPosted: Sat Apr 07, 2018 1:06 am    Post subject: LOW VALUES as a KEY
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

Active Member


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

PostPosted: Sat Apr 07, 2018 2:38 am    Post subject:
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 Member


Joined: 14 Mar 2007
Posts: 10478
Location: italy

PostPosted: Sat Apr 07, 2018 3:10 am    Post subject: Reply to: LOW VALUES as a KEY
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: 8337
Location: Dubuque, Iowa, USA

PostPosted: Sat Apr 07, 2018 3:19 am    Post subject: Reply to: LOW VALUES as a KEY
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: 23
Location: Brazil

PostPosted: Mon Apr 09, 2018 6:57 pm    Post subject:
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

Active Member


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

PostPosted: Mon Apr 09, 2018 7:19 pm    Post subject:
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: 23
Location: Brazil

PostPosted: Mon Apr 09, 2018 10:09 pm    Post subject: Reply to: LOW VALUES as a KEY
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: 23
Location: Brazil

PostPosted: Mon Apr 09, 2018 11:36 pm    Post subject:
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 Member


Joined: 14 Mar 2007
Posts: 10478
Location: italy

PostPosted: Tue Apr 10, 2018 11:24 am    Post subject: Reply to: LOW VALUES as a KEY
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: 23
Location: Brazil

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

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

Senior Member


Joined: 14 Mar 2007
Posts: 10478
Location: italy

PostPosted: Tue Apr 10, 2018 11:36 pm    Post subject: Reply to: LOW VALUES as a KEY
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Query to compare 2 values of 1 column... Poha Eater DB2 13 Fri Mar 09, 2018 10:45 am
No new posts attchmvs from rexx subroutine that re... harisukumaran CLIST & REXX 1 Fri Jan 19, 2018 5:29 am
No new posts Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 1 Tue Sep 12, 2017 1:42 am
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm

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