List AS400 files
Solved
mica94
Posted messages
39
Registration date
Status
Member
Last intervention
-
tirsix -
tirsix -
Hello,
I just joined a company that operates on AS400, which I know very little about.
I have request queries to execute (I can do queries), but I don't know where to find the files to read.
I would like to know if there is a command to list the files in a library along with their descriptions.
Thank you
I just joined a company that operates on AS400, which I know very little about.
I have request queries to execute (I can do queries), but I don't know where to find the files to read.
I would like to know if there is a command to list the files in a library along with their descriptions.
Thank you
Configuration: Windows 2000 Firefox 2.0.0.1
12 answers
-
Good evening,
It seems to me that the following file can help you: QSYS/QADBXREF
If I remember correctly, it gathers all the files from your AS400
Gwénaël -
hello hi I am an independent expert on AS400
you can contact me by email.
I respond to all questions.
Best regards RC.-
-
Well, with the JDBC provided on the AS400, right?
/QIBM/ProdData/HTTP/Public/jt400/lib
But personally, I don't find it very nice to access the database via SQL. Practical for sure, but fragile, in case of changes to the database, which may also be used by a "400" application. Most of the time, in companies that have been using an AS400 for a certain period, there is a significant list of native programs, RPG or Cobol. It's better to call them rather than reinvent their functionalities.
Seb -
-
On AS400, the command to check the existence of an object is CHKOBJ OBJ(BIB/FILE) OBJTYPE(*FILE). This command needs to be encapsulated in a small CLP program with a Yes/No output parameter, and this program should be called from VB. It’s a bit cumbersome, but in case of a direct command call from VB, we would also need to intercept the message giving the response, which would also be cumbersome, to my knowledge.
There you go. -
-
-
Hello,
You type this command and press F4 to change the name of the library (MABIB) and the output file (MONFIC)
DSPOBJD OBJ(mabib/*ALL) OBJTYPE(*FILE) DETAIL(*FULL) OUTPUT(*OUTFILE) OUTFILE(QTEMP/monfic)
Good luck -
Hi,
it’s been almost 3 years since I last touched an AS400, so thanks for being understanding... let’s see if I haven’t lost my memory.
You start with the DSPLIBL command which displays all the libraries in your environment.
Then for each library (non-system of course) you do a WRKOBJ with *FILE as the object type.
And there you go, you’ll eventually find the library that contains your files...
If needed, I still have some old documentation... don’t hesitate to ask me questions.
A++
------------------------------------------------------------------
If there’s no solution, there’s no problem! -
Thank you very much, I have what I want.
;) -
Hello!!!
I currently have to run SQL queries on an AS400, but it is not on our premises (remote site and no possibility to access the "terminal")
My question is as follows: Can we run the command DSPLIBL via an SQL query????
Thank you in advance.
Founnz -
Hello!
Why don’t you work on a 5250 terminal?
--
The wolf, solitary and mysterious. -
AS400 is not software; it is an IBM machine running OS 400. Not the same thing at all.
Wolf.
--
The wolf, solitary and mysterious. -
-
```c
#include <stdio.h>
#include <stdlib.h>
#include <dirent.h>
#include <string.h>
int compare(const void *a, const void *b) {
return strcmp(*(const char **)a, *(const char **)b);
}
int main() {
DIR *dir;
struct dirent *ent;
char *files[100];
int count = 0;
if ((dir = opendir(".")) != NULL) {
while ((ent = readdir(dir)) != NULL) {
files[count] = malloc(strlen(ent->d_name) + 1);
strcpy(files[count], ent->d_name);
count++;
}
closedir(dir);
qsort(files, count, sizeof(char *), compare);
printf("Contents of the directory:\n");
for (int i = 0; i < count; i++) {
printf("%s\n", files[i]);
free(files[i]);
}
} else {
perror("Could not open directory");
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
```</string.h></dirent.h></stdlib.h></stdio.h> -
Hello, is it possible to automatically feed a database in Excel from AS400? Can I go through an email? Thank you for your help.
-
Hello
I work on AS400 and I would like to have the command that can give me for a PF file
ZONE, ATTRIBUTE, LENGTH, TYPE, DESCRIPTION.
But the DSPFFD command does not meet my needs; I need this in a list.
Thank you in advance.-
To list the zones of a file, you need to create a program that analyzes the output file generated by the command:
DSPFFD FILE(&BIBL/&FICH) OUTPUT(*OUTFILE) OUTFILE(QTEMP/DSPFLD00) SYSTEM(*LCL)
This command lists the zones of the file &FICH from the library &BIBL in the DSPFLD00 file in QTEMP.
I hope this answers your question. -
-