|
TABLE A1
R A1R
ACOL1 6A
ACOL2 6A
ACOL3 6A
TABLE A2
R A2R
BCOL1 9A
BCOL2 3A
TABLE A1
*...+....1....+...
A1AAAAA2AAAAA3AAAA
B1BBBBB2BBBBB3BBBB
TABLE A2
*...+....1..
A1AA2AA3ADUH
SELECT * FROM ROB/A1 WHERE (SUBSTR(ACOL1,1,3)
CONCAT SUBSTR(ACOL2,1,3)
CONCAT SUBSTR(ACOL3,1,3))
=(SELECT BCOL1 FROM ROB/A2)
ACOL1 ACOL2 ACOL3
A1AAAA A2AAAA A3AAAA
CREATE VIEW ROB/A3 AS SELECT ACOL1, ACOL2, ACOL3, BCOL1, BCOL2 FROM
ROB/A1, ROB/A2 WHERE (SUBSTR(ACOL1,1,3) CONCAT SUBSTR(ACOL2,1,3)
CONCAT SUBSTR(ACOL3,1,3))=BCOL1
SELECT * FROM ROB/A3 ORDER BY BCOL1
ACOL1 ACOL2 ACOL3 BCOL1 BCOL2
A1AAAA A2AAAA A3AAAA A1AA2AA3A DUH
DDS? We don't need no stinkin' DDS!
5716SS1 V4R5M0 000526 Display File Description
10/19/00 9:41:52 Page 1
File . . . . . . . . . . . : A3
Library . . . . . . . . . : ROB
Type of information . . . . : *ALL
File attributes . . . . . . : *ALL
System . . . . . . . . . . : *LCL
Processor . . . . . . . . . : IBM AS/400 Display File Description
Processor
File . : A3 Library . : ROB Type of file . : Logical
*DATA Auxiliary Storage Pool ID . : 01
Data Base File Attributes
Externally described file . . . . . . . . . : Yes
SQL file type . . . . . . . . . . . . . . . : VIEW
File level identifier . . . . . . . . . . . : 1001020093853
Creation date . . . . . . . . . . . . . . . : 10/20/00
Text 'description' . . . . . . . . . . . . : TEXT
Distributed file . . . . . . . . . . . . . : No
DBCS capable . . . . . . . . . . . . . . . : No
Maximum members . . . . . . . . . . . . . . : MAXMBRS 1
Number of members . . . . . . . . . . . . . : 1
SQL view create statement . . . . . . . . . :
CREATE VIEW A3 AS SELECT ACOL1, ACOL2, ACOL3, BCOL1, BCOL2 FROM ROB.
A1, ROB.A2 WHERE (SUBSTR(ACOL1,1,3) CONCAT SUBSTR(ACOL2,1,3) CONCAT
SUBSTR(ACOL3,1,3))=BCOL1
Record format selector program . . . . . . : FMTSLR *NONE
Records to force a write . . . . . . . . . : FRCRATIO *NONE
Maximum file wait time . . . . . . . . . . : WAITFILE *IMMED
Maximum record wait time . . . . . . . . . : WAITRCD 60
With check option . . . . . . . . . . . . . : NONE
Allow read operation . . . . . . . . . . . : Yes
Allow write operation . . . . . . . . . . . : No
Allow update operation . . . . . . . . . . : ALWUPD *NO
Allow delete operation . . . . . . . . . . : ALWDLT *NO
Record format level check . . . . . . . . . : LVLCHK *YES
Access path . . . . . . . . . . . . . . . . : Arrival
Maximum record length . . . . . . . . . . . : 30
5716SS1 V4R5M0 000526 Display File Description
10/19/00 9:41:52 Page 2
File . : A3 Library . : ROB Type of file . : Logical
*DATA Auxiliary Storage Pool ID . : 01
Access Path Description
Access path . . . . . . . . . . . . . . . . : Arrival
Files accessed by logical file PFILE
File Library LF Format
A1 ROB A3
A2 ROB A3
Sort Sequence . . . . . . . . . . . . . . . : SRTSEQ *HEX
Language identifier . . . . . . . . . . . . : LANGID ENU
5716SS1 V4R5M0 000526 Display File Description
10/19/00 9:41:52 Page 3
File . : A3 Library . : ROB Type of file . : Logical
*DATA Auxiliary Storage Pool ID . : 01
Member Description
Member . . . . . . . . . . . . . . . . . . : MBR A3
Member level identifier . . . . . . . . . : 1001020093853
Member creation date . . . . . . . . . . : 10/20/00
Text 'description' . . . . . . . . . . . : TEXT
Expiration date for member . . . . . . . : EXPDATE *NONE
Current number of records . . . . . . . . : 2
Number of deleted records . . . . . . . . : 0
Record format selector program . . . . . : FMTSLR *NONE
Records to force a write . . . . . . . . : FRCRATIO *NONE
Share open data path . . . . . . . . . . : SHARE *NO
Implicit access path sharing . . . . . : No
Last change date/time . . . . . . . . . . : 10/20/00
09:38:53
Last save date/time . . . . . . . . . . . :
Last restore date/time . . . . . . . . . :
Last used date . . . . . . . . . . . . . : 10/20/00
Days used count . . . . . . . . . . . . . : 1
Reset date . . . . . . . . . . . . . . :
Number of data members . . . . . . . . . : 2
Based on file . . . . . . . . . . . . . . : A1
Library . . . . . . . . . . . . . . . . : ROB
Member . . . . . . . . . . . . . . . . : A1
Based on file . . . . . . . . . . . . . . : A2
Library . . . . . . . . . . . . . . . . : ROB
Member . . . . . . . . . . . . . . . . : A2
5716SS1 V4R5M0 000526 Display File Description
10/19/00 9:41:52 Page 4
File . : A3 Library . : ROB Type of file . : Logical
*DATA Auxiliary Storage Pool ID . : 01
Record Format List
Record Format Level
Format Fields Length Identifier
A3 5 30 2FAFACE3896B4
Text . . . : FORMAT0001
Total number of formats . . . . . . . . . : 1
Total number of fields . . . . . . . . . . : 5
Total record length . . . . . . . . . . . : 30
5716SS1 V4R5M0 000526 Display File Description
10/19/00 9:41:52 Page 5
File . : A3 Library . : ROB Type of file . : Logical
*DATA Auxiliary Storage Pool ID . : 01
Member List
Source Creation Last Change
Deleted
Member Size Type Date Date Time Records
Records
A3 0 10/20/00 10/20/00 09:38:53 2
0
Text:
Total number of members . . . . . . . . . : 1
Total number of members not available . . : 0
Total records . . . . . . . . . . . . . . : 2
Total deleted records . . . . . . . . . . : 0
Total of member sizes . . . . . . . . . . : 0
Rob Berendt
==================
Remember the Cole!
Ted Barry
<TBARRY@smtpgate.centralsan. To:
RPG400-L@midrange.com
dst.ca.us> cc:
Sent by: Subject: Logical
File: CONCAT vs SST
owner-rpg400-l@midrange.com
10/19/00 06:29 PM
Please respond to RPG400-L
I have a client that needs access to our Land Management database. In
particular our key is assessors parcel number (APN) 3 separate fields
that comprise the APN. Each field is 6A, so total length of 18.
My problem is the database we're trying to link it to only uses the first 3
pos. of each of those fields (9A total). The numbers are said to match
up, which I'm not concerned about...
The frustrating thing is the syntax of SST in a logical, according to the
book, the field that I'm SSTing into has to exist in the PFILE. Am I
reading
this correctly? I could use CONCAT, but don't think this is acceptable to
the client. Why is it that you can create fields using CONCAT, but can't
w/SST? This seems really stupid and is causing me a major headache.
I'd hate to have to create another file, just to satisfy my clients
request...Any suggestions?
Thanks,
Ted J. Barry
Programmer/Analyst
Central Contra Costa Sanitary District
5019 Imhoff Place
Martinez, CA 94553-4392
(925) 229-7389
(925) 676-7211 fax
tbarry@centralsan.dst.ca.us
http://www.centralsan.org
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.