You could also pull out data using the SUBSTR function on the fields in a SELECT statement. It isn't pretty but it works.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Tuesday, November 05, 2013 4:28 PM
To: Midrange Systems Technical Discussion
Subject: Re: Questions about S/36 files
Wrong. SQL does work
INSERT INTO QS36F/JIMMY (F00001, K00001, F00002) VALUES('A', 'B',
'C')
1 rows inserted in JIMMY in QS36F.
select * from qs36f/jimmy
....+....1....+....2....+....3....+....4....+....5....
F00001 K00001 F00002
A B C
******** End of data ********
Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
From: Pat Barber <mboceanside@xxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 11/05/2013 04:10 PM
Subject: Re: Questions about S/36 files
Sent by: midrange-l-bounces@xxxxxxxxxxxx
There are NO S/36 files on the I, but a very simple DDS that represents
the S/36 file.
The following is a 256 byte file with a index key of 11 in the first 11
bytes.
It is externally described but a very VERY short description with one
field and one key
description. The system doesn't care if it is "flat" or "DDS" described,
they
would work no matter what.
SQL would not work because the file is NOT externally described
Note the names created by the system.
The following file was created using BLDFILE command.
The file description states that this file is "NOT"
externally described because of the file creation method.
Display File Field Description
Input parameters
File . . . . . . . . . . . . . . . . . . . : ACCOUNTS
Library . . . . . . . . . . . . . . . . . : *LIBL
File Information
File . . . . . . . . . . . . . . . . . . . : ACCOUNTS
Library . . . . . . . . . . . . . . . . . : TCS
File location . . . . . . . . . . . . . . . : *LCL
Externally described . . . . . . . . . . . : No
Number of record formats . . . . . . . . . : 1
Type of file . . . . . . . . . . . . . . . : Physical
File creation date . . . . . . . . . . . . : 09/30/13
Record Format Information
Record format . . . . . . . . . . . . . . . : ACCTS
Format level identifier . . . . . . . . . . : 2696BD8B9F35D
Number of fields . . . . . . . . . . . . . : 2
Record length . . . . . . . . . . . . . . . : 256
Field Level Information
Data Field Buffer Buffer Field Column
Field Type Length Length Position Usage Heading
K00001 CHAR 11 11 1 Both
Keyboard shift . . . . . . . . . . . . . : A
Coded Character Set Identifier . . . . . : 65535
F00001 CHAR 245 245 12 Both
Keyboard shift . . . . . . . . . . . . . : A
Coded Character Set Identifier . . . . . : 65535
A simple conversion to native should not take over a few minutes "IF"
you know the correct file layout. It will take longer to key the DDS
than anything else.
Yes you can create a S/36 "like" file by using a
CRTPF FILE(TCS/SAMPLE1) RCDLEN(256) but it is still a
DDS described file as far as the system is concerned.
On 11/5/2013 9:08 AM, James H. H. Lampert wrote:
A couple of questions about S/36 files, prompted by a potential new
customer whose whole native system is apparently set up around them:
First, while I've occasionally futzed around with totally flat,
non-keyed files, and while I've used program-described mode to
circumvent level-check problems on externally-described files that
change regularly, but in a manner that's under our control, I don't have
a lot of experience with actual S-36 files. Am I correct in my
understanding that an S-36 file can be both flat and keyed at the same
time? Is there a convenient way to create a file indistinguishable from
an S-36 file on a V4 or V6 box that doesn't have any S-36 emulation
installed?
Second, can SQL access an S-36 file? Is it difficult?
--
JHHL
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/midrange-l.
________________________________
Scott Schollenberger
Vice President, Research & Development
P: 610-239-9988 x305
F: 610-239-9995
E: SSchollenberger@xxxxxxxxxxxxxxxxxx
[
http://www.harriscomputer.com/images/signatures/HarrisSchools.jpg]
[
http://www.harriscomputer.com/images/signatures/DivisionofHarris.gif]<
http://www.harriscomputer.com/>
100-2011 Renaissance Blvd.
King of Prussia, PA
19406
www.harris-schoolsolutions.com<
http://www.harris-schoolsolutions.com>
This message is intended exclusively for the individual or entity to which it is addressed. This communication may contain information that is proprietary, privileged or confidential or otherwise legally exempt from disclosure. If you are not the named addressee, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this message in error, please notify the sender immediately by e-mail and delete all copies of the message.
As an Amazon Associate we earn from qualifying purchases.