Re: C on z/OS questions -- Thanks!

2006-03-25 Thread john stephens
To all those who lended their hands and knowlege, thank you.

The information provided was of great worth and I was able to get the routine 
linked and callable in the manner I needed.

A special thanks to Anyd Robertson for his examples.  Those examples made all 
the difference in the project.

Again, thank you to all who responded.

John Stephens



On Tuesday 21 March 2006 12:09, john stephens wrote:
 Hey all,

 I have recently inhereted an application that was written in C on a Win32 /
 AIX platform that needs to be moved up to the mainframe (z/OS V1R4.0).

 I have never had to use the C compiler on the MF and to say I am confused
 would be an understatment.  I know I am missing some connecting dots.

 In order to compile the routine we have had to replace all our square
 brackets with trigraphs and digraphs.  I know there has to be a compile
 option that pretty much emululates a win32 or AIX environment as far as
 acceptable chars.

 Also, this routine is going to be used as a called subroutine by both
 Assembler and COBOL.  In the Win32 envirionnment, I don't need a 'main'
 section and I can compile it into a .dll thereby making it unique and
 callable.  However, on the MF I can't get past the compile without a
 'main'.

 And linking is another problem... sigh...

 I'm looking for a boost up here.  Is there someone on the list who would be
 willing to help me work through some of the issues I'm having?

 Many Many thanks in advance.

 John Stephens

 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
 Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: C on z/OS questions

2006-03-22 Thread john stephens
On Tuesday 21 March 2006 20:26, Shmuel Metz (Seymour J.) wrote:
 In [EMAIL PROTECTED], on 03/21/2006

at 01:47 PM, john stephens [EMAIL PROTECTED] said:
 I need to be able to have this routine dynamically linked at run time
 if/when  the user requries.

 Dynamically linked from what? Why can't you use a DLL?



Well herein lies part of my problem, I don't know whats available to use on 
z/OS.   Can I create a DLL?  How do I?  Can a DLL be called from a COBOL 
program running in batch mode via JCL?  Can it be called from Assembler?  
How?

If these questions sound elementry its becuase they are.  I have been out of 
the sysprog arena for over 10 years and z/OS passed me up a long time ago.  
I've gone to the manuals and all of them assume a working familiarity with 
z/OS which I don't have.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: C on z/OS questions

2006-03-22 Thread john stephens
On Tuesday 21 March 2006 20:21, Shmuel Metz (Seymour J.) wrote:
 In [EMAIL PROTECTED], on 03/21/2006

at 12:09 PM, john stephens [EMAIL PROTECTED] said:
 In order to compile the routine we have had to replace all our square
 brackets  with trigraphs and digraphs.

 Why? It sounds like you're using the wrong code page.

What code page should I be using and how do I specify it?

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: C on z/OS questions

2006-03-22 Thread john stephens
On Wednesday 22 March 2006 04:09, Andy Robertson wrote:
 On Tue, 21 Mar 2006 13:47:20 -0500, john stephens [EMAIL PROTECTED]

snip.


 This is static not dynamic  linkage but bear with me

 We faced similar problems to you with the additional constraint that we
 had to call our dynamically loadable subroutines from Assembler, Cobol,
 non-LE-compliant assembler, and C mains, all of them pre-existing and some
 calling old routines written in assembler or COBOL which we wanted to
 replace by C routines of the same name.

 Some of these calls used dynamic COBOL load, some used the LOAD macro.

 We could not use DLL because you can't mix DLLs and COBOL dynamic load in
 one run unit.



 Our solution was to wrap our C routines in a small COBOL wrapper, then
 they look to everything like COBOL.  You just call your C code  from a
 cobol program (as above) but you make the COBOL program a subroutine and
 call  the COBOL subroutine from your mainlines.Inelegant but works
 robustly.



 If you can create a new clean run time environment and you have no
 assembler you can go for DLL on MVS (I can show you how to do this as
 well).
 c

Andy,

Thank you.  This is a tremendous help.

A couple of questions.  What is the purpose of the pre-link steps and under 
what conditions (if any) are they required / optional?

I would prefer to have the stub program be in assembler.  Can I assume that 
standard rules apply (ie. loading parm list at R1 and BALR R14,R15 or BASSM 
R14,R15)?

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


C on z/OS questions

2006-03-21 Thread john stephens
Hey all,

I have recently inhereted an application that was written in C on a Win32 / 
AIX platform that needs to be moved up to the mainframe (z/OS V1R4.0).

I have never had to use the C compiler on the MF and to say I am confused 
would be an understatment.  I know I am missing some connecting dots.

In order to compile the routine we have had to replace all our square brackets 
with trigraphs and digraphs.  I know there has to be a compile option that 
pretty much emululates a win32 or AIX environment as far as acceptable chars.

Also, this routine is going to be used as a called subroutine by both 
Assembler and COBOL.  In the Win32 envirionnment, I don't need a 'main' 
section and I can compile it into a .dll thereby making it unique and 
callable.  However, on the MF I can't get past the compile without a 'main'.

And linking is another problem... sigh...

I'm looking for a boost up here.  Is there someone on the list who would be 
willing to help me work through some of the issues I'm having?

Many Many thanks in advance.

John Stephens
jls(at)jkstephensdotnet

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: C on z/OS questions

2006-03-21 Thread john stephens
On Tuesday 21 March 2006 12:20, Andy Robertson wrote:
 On Tue, 21 Mar 2006 12:09:58 -0500, john stephens [EMAIL PROTECTED]

 wrote:
 I'm looking for a boost up here.  Is there someone on the list who would

 be

 willing to help me work through some of the issues I'm having?
 
 Many Many thanks in advance.
 
 John Stephens
 jls(at)jkstephensdotnet

 We use C on the mainframe.

 We find it more convenient to use trigraphs than mess about with code
 pages, so I can't help you there, but we use compiled functions statically
 linked to Cobol mainlines.

 What are you trying to do?

What I have is a single routine that recieves a buffer and returns a 2D data 
matrix barcode in the same buffer.

I need to be able to have this routine dynamically linked at run time if/when 
the user requries.  Therefore, I need to be able to compile and link this 
routine without a 'main'.  I can live with the di/tri-graphs if need be.

As far as linking goes, the JCL I was given has a compile proc step, a 
pre-link proc step and a link proc step.  Unfortunatly, neither of the last 
two will run cleanly.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html