Re: porting Unix C code to zOS

2003-06-22 Thread Roger Lacroix


Here's a JCL snippet for you:
//CBCCL PROC MEM=,
//   C1='LO,SO,XR,OF,LIST,DEF(MVS),DEF(ALL_SOURCE)',
//   C2='LOC(EN_US.IBM-1047)',
//   C3=' ',
...
//COMPILE EXEC
PGM=CBCDRVR,REGION=&CREGSIZ,
// PARM=('&CRUN/CXX &C1 &C2 &C3
SE(''SYS1.SCEEH.+'',''SYS1.SCLBH.+'')')

If you look at the C1 PROC variable, you will see 2 defines: MVS
& ALL_SOURCE
Therefore, any define Unix or Windows define that is like:
   -DMY_NEW_DEFINE
then for OS/390 & z/OS use 
  
DEF(MY_NEW_DEFINE)
in your JCL.
later
Roger...

At 10:24 PM 6/22/2003, you wrote:
That's what took it.
Thanks to David and Neil.
I got it into the source file with a #define ALL_SOURCE
I had that in originally, but not at the top.  I had it right before
my
include for time.h
Once I put it at the top it worked.  And I expect that when I figure
out how
to change the JCL for the compile to do -DALL_SOURCE  I won't have
to change
my source from HP to AIX to Sun to zOS.
Thanks
Tom
- Original Message -
From: "David C. Partridge"
<[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 21, 2003 4:02 AM
Subject: Re: porting Unix C code to zOS

> -DALL_SOURCE on the compile command line should do it.
>
> Dave
>
> Instructions for managing your mailing list subscription are
provided in
> the Listserv General Users Guide available at
http://www.lsoft.com
> Archive:
http://vm.akh-wien.ac.at/MQSeries.archive
Instructions for managing your mailing list subscription are provided
in
the Listserv General Users Guide available at
http://www.lsoft.com
Archive:
http://vm.akh-wien.ac.at/MQSeries.archive



Re: porting Unix C code to zOS

2003-06-22 Thread Tom Kane
That's what took it.
Thanks to David and Neil.
I got it into the source file with a #define ALL_SOURCE
I had that in originally, but not at the top.  I had it right before my
include for time.h
Once I put it at the top it worked.  And I expect that when I figure out how
to change the JCL for the compile to do -DALL_SOURCE  I won't have to change
my source from HP to AIX to Sun to zOS.

Thanks
Tom
- Original Message -
From: "David C. Partridge" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 21, 2003 4:02 AM
Subject: Re: porting Unix C code to zOS


> -DALL_SOURCE on the compile command line should do it.
>
> Dave
>
> Instructions for managing your mailing list subscription are provided in
> the Listserv General Users Guide available at http://www.lsoft.com
> Archive: http://vm.akh-wien.ac.at/MQSeries.archive

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive


Re: porting Unix C code to zOS

2003-06-21 Thread David C. Partridge
-DALL_SOURCE on the compile command line should do it.

Dave

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive


Re: porting Unix C code to zOS

2003-06-20 Thread Tom Kane
Neil,
I think it's the compiler directive for XPG4 or POSIX that I need.
I can see it in systime.h but can't rigure out the way to turn on XPG4 or
setlanglevel to posix or something that I really need.

Tom

- Original Message -
From: "Neil Casey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 20, 2003 1:36 AM
Subject: Re: porting Unix C code to zOS


> Hi Tom,
>
> I have all of my MQ channel exits and stuff ported to zOS. It gets
> interesting making the exit entry points work (lots of conditional
> compilation depending on platform).
>
> The main thing with the zOS C libraries and code portability is POSIX or
> XPG4. If your C code is posix complient, you shouldn't have too many
> problems with porting it to zOS. As for timeval, I found it defined in
>  which is the same location in zOS as it is in unix.
>
> I am running zOS 1.4.
>
> Make sure your compile JCL has the proper locations defined, or if you are
> using USS you need to have the right environment variables (I think). I
> have done all my C stuff on zOS using JCL for compiles. We don't use USS a
> great deal at my site.
>
> For information on compilation and run time library support, look in zOS
> V1R4.0 C/C++ Bookshelf (CBCBS130).
>
> Regards,
>
> Neil Casey.
>
>
> |-+>
> | |   Tom Kane |
> | |   <[EMAIL PROTECTED]|
> | |   T>   |
> | |   Sent by: MQSeries|
> | |   List |
> | |   <[EMAIL PROTECTED]|
> | |   n.AC.AT> |
> | ||
> | ||
> | |   20/06/2003 15:16 |
> | |   Please respond to|
> | |   MQSeries List|
> | ||
> |-+>
>
>-------------------
---|
>   |
|
>   |   To:   [EMAIL PROTECTED]
|
>   |   cc:
|
>   |   Subject:  porting Unix C code to zOS
|
>
>---
---|
>
>
>
>
> Does anybody do this regularly?
> I have simple unix command line programs that would be great to run on
MVS.
> But I can't get past things like 'timeval'.
> I wanted to be able to time my code and figured it out on HP, Sun and AIX.
> But now I'm stumped on MVS.
> And that's where I started, all those years ago in MVS Support.
>
> TIA
>
> Tom
>
> Instructions for managing your mailing list subscription are provided in
> the Listserv General Users Guide available at http://www.lsoft.com
> Archive: http://vm.akh-wien.ac.at/MQSeries.archive

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive


Re: DLQ Handlers on z/OS (From: porting Unix C code to zOS)

2003-06-20 Thread Morag Hughson
Ian,

The DLQ handler is shipped with MQ V5.2 on z/OS - CSQUDLQH - so perhaps
you'd like to try our copy ? I'm afraid you'll have to buy V5.2 first
though ;-)

Cheers
Morag

Morag Hughson
WebSphere MQ for z/OS Development
Internet: [EMAIL PROTECTED]




  Ian Metcalfe
  <[EMAIL PROTECTED]> To:   [EMAIL PROTECTED]
  Sent by: MQSeriescc:
  List     Subject:  Re: porting Unix C code to zOS
  <[EMAIL PROTECTED]
  N.AC.AT>


  20/06/2003 12:50
  Please respond to
  MQSeries List






I've made a (brief so far) attempt to port the DLQ handler to z/OS. It
didn't instantly fall into place, and wasn't a priority, so I left it.

But I'd be happy to accept a copy of someone's successful attempt... if one
exists? ;)

Ian
  -Original Message-
  From: MQSeries List [mailto:[EMAIL PROTECTED] Behalf Of Tom
  Kane
  Sent: Friday, 20 June 2003 15:16
      To: [EMAIL PROTECTED]
  Subject: porting Unix C code to zOS

  Does anybody do this regularly?
  I have simple unix command line programs that would be great to run
  on MVS.  But I can't get past things like 'timeval'.
  I wanted to be able to time my code and figured it out on HP, Sun and
  AIX.  But now I'm stumped on MVS.
  And that's where I started, all those years ago in MVS Support.

  TIA

  Tom

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive


Re: porting Unix C code to zOS

2003-06-20 Thread Ian Metcalfe



I've 
made a (brief so far) attempt to port the DLQ handler to z/OS. It didn't 
instantly fall into place, and wasn't a priority, so I left 
it.
 
But 
I'd be happy to accept a copy of someone's successful attempt... if one exists? 
;)
 
Ian

  -Original Message-From: MQSeries List 
  [mailto:[EMAIL PROTECTED]On Behalf Of Tom KaneSent: 
  Friday, 20 June 2003 15:16To: 
  [EMAIL PROTECTED]Subject: porting Unix C code to 
  zOS
  Does anybody do this regularly?I have simple 
  unix command line programs that would be great to run on MVS.  But I 
  can't get past things like 'timeval'.
  I wanted to be able to time my code and figured 
  it out on HP, Sun and AIX.  But now I'm stumped on MVS.
  And that's where I started, all those years ago 
  in MVS Support.
   
  TIA
   
  Tom


Re: porting Unix C code to zOS

2003-06-19 Thread Neil Casey
Hi Tom,

I have all of my MQ channel exits and stuff ported to zOS. It gets
interesting making the exit entry points work (lots of conditional
compilation depending on platform).

The main thing with the zOS C libraries and code portability is POSIX or
XPG4. If your C code is posix complient, you shouldn't have too many
problems with porting it to zOS. As for timeval, I found it defined in
 which is the same location in zOS as it is in unix.

I am running zOS 1.4.

Make sure your compile JCL has the proper locations defined, or if you are
using USS you need to have the right environment variables (I think). I
have done all my C stuff on zOS using JCL for compiles. We don't use USS a
great deal at my site.

For information on compilation and run time library support, look in zOS
V1R4.0 C/C++ Bookshelf (CBCBS130).

Regards,

Neil Casey.


|-+>
| |   Tom Kane |
| |   <[EMAIL PROTECTED]|
| |   T>   |
| |   Sent by: MQSeries|
| |   List |
| |   <[EMAIL PROTECTED]|
| |   n.AC.AT> |
| ||
| ||
| |   20/06/2003 15:16 |
| |   Please respond to|
| |   MQSeries List|
| ||
|-+>
  
>--|
  |
  |
  |   To:   [EMAIL PROTECTED]  
|
  |   cc:  
      |
  |   Subject:  porting Unix C code to zOS 
  |
  
>--|




Does anybody do this regularly?
I have simple unix command line programs that would be great to run on MVS.
But I can't get past things like 'timeval'.
I wanted to be able to time my code and figured it out on HP, Sun and AIX.
But now I'm stumped on MVS.
And that's where I started, all those years ago in MVS Support.

TIA

Tom

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive


porting Unix C code to zOS

2003-06-19 Thread Tom Kane



Does anybody do this regularly?I have simple 
unix command line programs that would be great to run on MVS.  But I can't 
get past things like 'timeval'.
I wanted to be able to time my code and figured it 
out on HP, Sun and AIX.  But now I'm stumped on MVS.
And that's where I started, all those years ago in 
MVS Support.
 
TIA
 
Tom