Discussion:
where in DASD are MVS header files located?
(too old to reply)
travis+ml-h390@subspacefield.org [hercules-390]
2015-09-14 17:26:12 UTC
Permalink
Hello I am new to MVS and have an urgent question (would really love
an answer ASAP to finish this work today).

If someone could be so kind as to provide me the hercules commands to
extract the header files to a non-mainframe system I would be greatly
appreciative.

I am trying to get MVS source code to compile (actually, just pass the
preprocessor step) on Windows (for various reasons I don't want to go
into). I have done this by compiling under cygwin with various flags
(such as -std=c99 -c -w) and I "added" header files by creating
zero-length files in a custom include dir (-I custominc).

Now my remaining problems are due to missing header files
(e.g. decimal.h); things do not compile due to undefined structures.

Assuming that I have the DASD images from a variety of x86 OSes (Mac,
Linux, Windows), but that I have difficulty accessing the live Z
system and am relatively untrained in their file system, user
interface, can someone please tell me how to extract the header files
from the DASD images?

My DASD images include "JACIC1.CCKD" through "SARES.CCKD" in the IBM
directory and "AUT001.CCKD" through "USS01.CCKD" in the SYS directory.
--
http://www.subspacefield.org/~travis/ | if spammer then ***@subspacefield.org
"Computer crime, the glamor crime of the 1970s, will become in the
1980s one of the greatest sources of preventable business loss."
John M. Carroll, "Computer Security", first edition cover flap, 1977


[Non-text portions of this message have been removed]
'Dave G4UGM' dave.g4ugm@gmail.com [hercules-390]
2015-09-14 21:31:50 UTC
Permalink
-----Original Message-----
Sent: 14 September 2015 18:26
Subject: [hercules-390] where in DASD are MVS header files located?
Hello I am new to MVS and have an urgent question (would really love an
answer ASAP to finish this work today).
If someone could be so kind as to provide me the hercules commands to
extract the header files to a non-mainframe system I would be greatly
appreciative.
It depends on which "C" compiler you are using. There are at least three
that run on MVS and each compiler will have its own headers which may be in
different places.
I am trying to get MVS source code to compile
There is no MVS source code written in "C"...
(actually, just pass the
preprocessor step) on Windows (for various reasons I don't want to go
into).
I have done this by compiling under cygwin with various flags (such as -
std=c99 -c -w) and I "added" header files by creating zero-length files in
a
custom include dir (-I custominc).
Now my remaining problems are due to missing header files (e.g.
decimal.h);
things do not compile due to undefined structures.
Assuming that I have the DASD images from a variety of x86 OSes (Mac,
Linux, Windows), but that I have difficulty accessing the live Z system
and am
relatively untrained in their file system, user interface, can someone
please
tell me how to extract the header files from the DASD images?
The DASD images are no dependant on the underlying OS. MAC, Linux and
Windows DASD images are the same....
My DASD images include "JACIC1.CCKD" through "SARES.CCKD" in the IBM
directory and "AUT001.CCKD" through "USS01.CCKD" in the SYS directory.
Much easier to fire up MVS and download them from MVS....
--
http://www.subspacefield.org/~travis/ | if spammer then
will become in the 1980s one of the greatest sources of preventable
business
loss."
John M. Carroll, "Computer Security", first edition cover flap, 1977
[Non-text portions of this message have been removed]
------------------------------------
------------------------------------
http://groups.yahoo.com/group/hercules-390
http://www.hercules-390.org
------------------------------------
Yahoo Groups Links
travis+ml-h390@subspacefield.org [hercules-390]
2015-09-14 23:22:01 UTC
Permalink
Post by travis+ml-***@subspacefield.org [hercules-390]
I am trying to get MVS source code to compile
There is no MVS source code written in "C"...
Thank you Dave and Tony for your prompt and helpful replies.

That should have read "C code designed to run on MVS" :-)
Post by travis+ml-***@subspacefield.org [hercules-390]
Much easier to fire up MVS and download them from MVS....
...
Post by travis+ml-***@subspacefield.org [hercules-390]
It's not a well defined question. z/OS has two kinds of "files" - a
UNIX one that is just like any other UNIX file system with
directories, a root, and so on, and MVS datasets (sometimes called
"classic"), which are not even a little bit like UNIX files.
Regardless, the way these are stored on the kind of disk images you
reference below makes them a very long way from trivial to extract.
This strongly suggests that what you have are images from an IBM
ADCD system that someone converted to run under Hercules. First, you
should be aware that this is almost certainly not licensed by IBM. But
if you have access to a running z/OS system, your best bet by far is
to use the relevant UNIX files in place via FTP or even SMB or NFS
mounting them. This way you just see a UNIX file structure that you
are used to, and you can copy the files or conceivably use them in
place without having to learn anything to speak of about z/OS.
Ah thank you. Based on your advice I decided to give up on the DIY
and reach out to our systems team for assistance, and it turns out
that was a good idea after all as I required company platform-specific
header files, as well as ZOS language environment files.

To answer your question I am doing some analytics on the source and so
needed preprocessed (but not necessarily compiled) code. My
experiments with getting help on the matter from IBM were not
immediately fruitful as it falls far from the realm of their normal
customer requests (I'm sure you can imagine).

I am quite enjoying learning about the IBM tech and look forward
to finishing up some proper training once my deadlines are past.
--
http://www.subspacefield.org/~travis/ | if spammer then ***@subspacefield.org
"Computer crime, the glamor crime of the 1970s, will become in the
1980s one of the greatest sources of preventable business loss."
John M. Carroll, "Computer Security", first edition cover flap, 1977


[Non-text portions of this message have been removed]
Tony Harminc tharminc@gmail.com [hercules-390]
2015-09-14 21:57:10 UTC
Permalink
Post by travis+ml-***@subspacefield.org [hercules-390]
Hello I am new to MVS and have an urgent question (would really love
an answer ASAP to finish this work today).
OK - we'll try and hop to it, but this group is about the Hercules emulator.
Post by travis+ml-***@subspacefield.org [hercules-390]
If someone could be so kind as to provide me the hercules commands to
extract the header files to a non-mainframe system I would be greatly
appreciative.
There is no single Hercules command to do this.
Post by travis+ml-***@subspacefield.org [hercules-390]
I am trying to get MVS source code to compile (actually, just pass the
preprocessor step) on Windows (for various reasons I don't want to go
into).
I imagine this means C source code written to run on a z/OS system.
(The term "MVS" is generally used mean much older ancestors to z/OS,
though it's not *wrong* to use it to refer to a core portion of z/OS.)

[...]
Post by travis+ml-***@subspacefield.org [hercules-390]
Assuming that I have the DASD images from a variety of x86 OSes (Mac,
Linux, Windows), but that I have difficulty accessing the live Z
system and am relatively untrained in their file system, user
interface, can someone please tell me how to extract the header files
from the DASD images?
It's not a well defined question. z/OS has two kinds of "files" - a
UNIX one that is just like any other UNIX file system with
directories, a root, and so on, and MVS datasets (sometimes called
"classic"), which are not even a little bit like UNIX files.
Regardless, the way these are stored on the kind of disk images you
reference below makes them a very long way from trivial to extract.
Post by travis+ml-***@subspacefield.org [hercules-390]
My DASD images include "JACIC1.CCKD" through "SARES.CCKD" in the IBM
directory and "AUT001.CCKD" through "USS01.CCKD" in the SYS directory.
This strongly suggests that what you have are images from an IBM ADCD
system that someone converted to run under Hercules. First, you should
be aware that this is almost certainly not licensed by IBM. But if you
have access to a running z/OS system, your best bet by far is to use
the relevant UNIX files in place via FTP or even SMB or NFS mounting
them. This way you just see a UNIX file structure that you are used
to, and you can copy the files or conceivably use them in place
without having to learn anything to speak of about z/OS.

If all you have is the images, but for some reason you can't run z/OS,
then I'd suggest your best bet is to find someone who is running z/OS
who can give you access to just these header files you need.

It would doubtless help a good bit if you can explain in more detail
what you are trying to accomplish, or at least confirm my assumptions.
If your existing C code was written for z/OS, not the least of your
problems may be converting it to use ASCII (vs EBCDIC).

Tony H.
kerravon86@yahoo.com.au [hercules-390]
2015-09-15 14:38:42 UTC
Permalink
Post by travis+ml-***@subspacefield.org [hercules-390]
I am trying to get MVS source code to compile (actually, just pass the
preprocessor step) on Windows (for various reasons I don't want to go
into). I have done this by compiling under cygwin with various flags
(such as -std=c99 -c -w) and I "added" header files by creating
zero-length files in a custom include dir (-I custominc).
Now my remaining problems are due to missing header files
(e.g. decimal.h); things do not compile due to undefined structures.
It just occurred to me - if you are only doing
pre-processing, then you should not be
getting errors about undefined structures.

So long as you provide dummy header
files, that should be all that is required.

Only the compiler, not the pre-processor,
should care about structures.

BFN. Paul.
kerravon86@yahoo.com.au [hercules-390]
2015-09-15 14:46:52 UTC
Permalink
Post by travis+ml-***@subspacefield.org [hercules-390]
(such as -std=c99 -c -w) and I "added" header files by creating
I think this was the problem. "-c" is
"compile only". You want "pre-process only".
For that, you probably need to change
the "-c" to "-P".

BFN. Paul.
kerravon86@yahoo.com.au [hercules-390]
2015-09-15 14:51:52 UTC
Permalink
"-c" is "compile only"
Also note that "compile only" means
"compile but don't link".

BFN. Paul.
kerravon86@yahoo.com.au [hercules-390]
2015-09-15 15:06:41 UTC
Permalink
change the "-c" to "-P".
I was thinking of Turbo C. For gcc
you need "-E". Also, I said you
shouldn't be getting structure errors
on a pre-process only, and I still
think that is correct, but I'm not
100% sure. My testing seems to
indicate that everything should be
fine, even if the header files
normally contain some #defines
or whatever that are no longer
being declared.

BFN. Paul.



C:\scratch\cccc>type temp.c
#define X 5

int foo(void)
{
return X;
}

C:\scratch\cccc>gcc -E temp.c
# 1 "temp.c"
# 1 "<command-line>"
# 1 "temp.c"


int foo(void)
{
return 5;
}

C:\scratch\cccc>type temp2.c


int foo(void)
{
return X;
}

C:\scratch\cccc>gcc -E temp2.c
# 1 "temp2.c"
# 1 "<command-line>"
# 1 "temp2.c"


int foo(void)
{
return X;
}

C:\scratch\cccc>

Loading...