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 - 3723 days ago
Last viewed on: 30 Nov 2023 (4232 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: 10 years 2 months 14 days 1 hours 38 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: 10 years 2 months 13 days 22 hours 32 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: 10 years 2 months 13 days 5 hours 32 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: 10 years 2 months 13 days 5 hours 11 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: 10 years 2 months 12 days 11 hours 34 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).