We have system36
files, and since these files are not externally described files and are internally described files
within system36
programs with predefined structures within the program itself. Please tell us if we can access the system36
files using SQL
.
Because there is no external description for
system36
files. Thus, all of that data is contained in a single field when you access the file in SQL. Therefore, when you want to use SQL to access data from asystem36
file you need to substring the data you want from the field.For Example, if the
System36
file name isFILE1
, and its single field isFLD1
then you can use the below SQL to get data fromsystem36
files, You can change substring positions at your end as per yoursystem36
file.Select substr(fld1, 5, 4), substr(fld1,10,5) from FILE1
where substr(fld1,1,4) = 'A001'
Please note that you can get the field name of the system6 file by typing SQL
select * from file1
and takingF4
to prompt the SQL query and then prompt the select fields.