Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

C programming on as400 ?

624 views
Skip to first unread message

Fredrik Andreasson

unread,
Apr 4, 2001, 10:26:22 AM4/4/01
to
Hello

I was wondering.
When programming in C you write...
#include <stdio.h>

I was wondering what "stdio.h" is in the machine.
Is it an physical file ?
A member of a physical file ?

Thanks in advance... Fredrik


Ma...@softlanding.com

unread,
Apr 4, 2001, 11:10:33 AM4/4/01
to
Frederik,

<stdio.h> would be a source member named "STDIO" in a source physical file
named "H" in library QCLE.

"myfile.h" would be a source member named "MYFILE" in a source physical
file named "H" in the job's library list.

Some of the "system includes" will come from source physical file "H" in
library QSYSINC.

Hope this helps.

Mark Phippard


Ugo Gagliardelli

unread,
Apr 4, 2001, 4:17:11 PM4/4/01
to

Fredrik Andreasson wrote:
>
> Hello
>
> I was wondering.
> When programming in C you write...
> #include <stdio.h>
>
> I was wondering what "stdio.h" is in the machine.
> Is it an physical file ?
> A member of a physical file ?

Yes, <stdio.h> is member STDIO of H file, if you specify, for example,
<sys/ioctl.h> means that the compiler will search for IOCTL member in
SYS source file.
--
Dr. Ugo Gagliardelli, Modena, Italy
Spaccamaroni andate a cagare/Spammers not welcome

Karl Hanson

unread,
Apr 4, 2001, 5:12:36 PM4/4/01
to
Ma...@softlanding.com wrote:
>
> <stdio.h> would be a source member named "STDIO" in a source physical file
> named "H" in library QCLE.
>
> "myfile.h" would be a source member named "MYFILE" in a source physical
> file named "H" in the job's library list.
>
> Some of the "system includes" will come from source physical file "H" in
> library QSYSINC.
>

Also note that (on recent releases) there are IFS symbolic links
defined, such as in:
/QIBM/include
/QIBM/ProdData/ILEC

These may be useful when compiling with stream file input, but I am
unfamiliar with setup of search paths to find include/H files via IFS.

--

Karl Hanson

Fredrik Andreasson

unread,
Apr 5, 2001, 4:48:04 AM4/5/01
to
Hello,

Thanks for all the answers. I really appreciated it.
I am happy with that but I it would't hurt to explain why I asked you...

You see I am experimenting with C on AS/400.
I have made a program that writes "wow" to the screen.
It works. I would just like it to clear the screen before it writes to it.
And this program runs without problem on DOS for example but not on AS/400.
This is the code I use...

#include <stdio.h>
#include <conio.h>
main()
{
clrscr();
printf("Wow it works...\n");
getchar();
}

It seems like <conio.h> does not exist in as/400 ?
I get this messages when trying to compile...

V01V080783/QCLSRC/CTEST line 2: Unable to find Äinclude file
*LIBL/H(CONIO).
V01V080783/QCLSRC/CTEST line 5: Function clrscr has not been prototyped
prior to use.


Thanks in advance... Fredrik
--> fredrik.a...@xpress.se


"Fredrik Andreasson" <fredrik.1....@volvo.com> wrote in message
news:9afauq$ij9$1...@vg170.it.volvo.se...

Fred A. Kulack

unread,
Apr 5, 2001, 10:07:42 AM4/5/01
to
Fredrik,
See my response to "Clearing the screen with C ??" post.


Ugo Gagliardelli

unread,
Apr 5, 2001, 4:07:15 PM4/5/01
to
Fredrik Andreasson wrote:
>
> Hello,
>
> Thanks for all the answers. I really appreciated it.
> I am happy with that but I it would't hurt to explain why I asked you...
>
> You see I am experimenting with C on AS/400.
> I have made a program that writes "wow" to the screen.
> It works. I would just like it to clear the screen before it writes to it.
> And this program runs without problem on DOS for example but not on AS/400.
> This is the code I use...
>
> #include <stdio.h>
> #include <conio.h>
> main()
> {
> clrscr();
> printf("Wow it works...\n");
> getchar();
> }
>
> It seems like <conio.h> does not exist in as/400 ?
You're right theres no console IO functions so no conio.h include file.
Screen IO on AS/400 is a different stff.
0 new messages