Midrange News for the IBM i Community


Posted by: clbirk
can one create a logical over a portion of a field
has no ratings.
Published: 18 Sep 2013
Revised: 20 Sep 2013 - 1282 days ago
Last viewed on: 25 Mar 2017 (2143 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

can one create a logical over a portion of a field Published by: clbirk on 18 Sep 2013 view comments(5)

I have some db tables that it would be desireable to create a logical that is over a portion of the field.

Example, say you have zip code and address 1 and what you want is zip code + only 10 positions of the address.

Creating the tables in SQL (well in inav). Going to use in rpg.  Can one do such?

 

 

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: can one create a logical over a portion of a field
Posted: 3 years 6 months 6 days 18 hours 36 minutes ago

With logical file DDS, yes. With SQL yes.

Posted by: clbirk
Premium member *
Comment on: can one create a logical over a portion of a field
Posted: 3 years 6 months 6 days 15 hours 30 minutes ago

bob, would you like to expound on how you do that...

Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: can one create a logical over a portion of a field
Posted: 3 years 6 months 5 days 22 hours 30 minutes ago
     A          R CUSTREC                   PFILE(CUSTMAST)    
     A            ZIPCODE                                      
     A            ADDR10                    SST(ADDRESS 1 10)
Posted by: SteveCCNJ
Premium member *
Egg Harbor Twp., NJ
Comment on: can one create a logical over a portion of a field
Posted: 3 years 6 months 5 days 22 hours 9 minutes ago

In DB2 you can CREATE VIEW over the table(s) and define the data any way you want.

Posted by: DaleB
Premium member *
Reading, PA
Comment on: can one create a logical over a portion of a field
Posted: 3 years 6 months 5 days 4 hours 32 minutes ago

Note that the use of a DDS SST() field must be input-only (I) or neither (N); i.e., you can't update a SST() field. There are other interactions with other keywords and a few other things to be aware of (see the DDS reference for full details).