How to send files from a mainframe to a Unix server from Cobolprogram?

This is a discussion on How to send files from a mainframe to a Unix server from Cobolprogram? within the cobol forums in Programming Languages category; Hello, I need to send files from a mainframe to a Unix server from a Cobol program. I tried to call FTP - but without success. It has to be from a cobol program, because number of file varies depending on daily activity. Any ideas how to do it? Thanks, Zalek...

Go Back   Application Development Forum > Programming Languages > cobol

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-27-2008, 06:45 AM
zalek
Guest
 
Default How to send files from a mainframe to a Unix server from Cobolprogram?

Hello,

I need to send files from a mainframe to a Unix server from a Cobol
program. I tried to call FTP - but without success. It has to be from
a cobol program, because number of file varies depending on daily
activity.
Any ideas how to do it?

Thanks,

Zalek
Reply With Quote
  #2  
Old 07-27-2008, 09:36 AM
Michael Mattias
Guest
 
Default Re: How to send files from a mainframe to a Unix server from Cobol program?

"zalek" <zalekbloom@hotmail.com> wrote in message
news:498652f6-b265-4111-96cd-8b30f0b6a29e@d45g2000hsc.googlegroups.com...
> Hello,
>
> I need to send files from a mainframe to a Unix server from a Cobol
> program. I tried to call FTP - but without success. It has to be from
> a cobol program, because number of file varies depending on daily
> activity.
> Any ideas how to do it?


How/why did FTP fail? I know others use FTP to do this, ergo it must be
do-able.

Although... you might get a better quantity of help with this in some
mainframe-specific peer support group, as opposed to a language-specific
group such as this.

MCM






Reply With Quote
  #3  
Old 07-27-2008, 10:26 AM
zalek
Guest
 
Default Re: How to send files from a mainframe to a Unix server from Cobolprogram?

On Jul 27, 9:36*am, "Michael Mattias" <mmatt...@talsystems.com> wrote:
> "zalek" <zalekbl...@hotmail.com> wrote in message
>
> news:498652f6-b265-4111-96cd-8b30f0b6a29e@d45g2000hsc.googlegroups.com...
>
> > Hello,

>
> > I need to send files from a mainframe to a Unix server from a Cobol
> > program. I tried to call FTP - but without success. It has to be from
> > a cobol program, because number of file varies depending on daily
> > activity.
> > Any ideas how to do it?

>
> How/why did FTP fail? I know others use FTP to do this, ergo it must be
> do-able.
>
> Although... you might get a better quantity of help with this in some
> mainframe-specific peer support group, as opposed to a language-specific
> group such as this.
>
> MCM


I am using IBM MVS mainframe. Here is the error I am getting:
CEE3648S POSIX(ON) run-time option in a nested enclave TESTFTP is not
supported.

Zalek
Reply With Quote
  #4  
Old 07-27-2008, 11:19 AM
Robert
Guest
 
Default Re: How to send files from a mainframe to a Unix server from Cobol program?

On Sun, 27 Jul 2008 03:45:29 -0700 (PDT), zalek <zalekbloom@hotmail.com> wrote:

>Hello,
>
>I need to send files from a mainframe to a Unix server from a Cobol
>program. I tried to call FTP - but without success. It has to be from
>a cobol program, because number of file varies depending on daily
>activity.
>Any ideas how to do it?


This is a very common activity. It is normally done with either FTP or NDM, the mainframe
version of FTP. Normally, FTP is run in scripting language such as ksh or by the job
scheduler. To call it from Cobol, you don't call FTP, you call SYSTEM to create a child
process, passing it the command to run FTP and the FTP command, which will be MGET.
Reply With Quote
  #5  
Old 07-27-2008, 12:02 PM
William M. Klein
Guest
 
Default Re: How to send files from a mainframe to a Unix server from Cobol program?

Robert,
I am not saying your answer isn't correct, but I haven't ever heard of
CALLing "SYSTEM" on MVS. (Possibly under Unix System Services, but that doesn't
seem to be what the OP is asking for). Are you certain that this is the way to
do this on MVS?

--
Bill Klein
wmklein <at> ix.netcom.com
"Robert" <no@e.mail> wrote in message
news:a24p8450m4tconemnau3uslb2q1gnke7k4@4ax.com...
> On Sun, 27 Jul 2008 03:45:29 -0700 (PDT), zalek <zalekbloom@hotmail.com>
> wrote:
>
>>Hello,
>>
>>I need to send files from a mainframe to a Unix server from a Cobol
>>program. I tried to call FTP - but without success. It has to be from
>>a cobol program, because number of file varies depending on daily
>>activity.
>>Any ideas how to do it?

>
> This is a very common activity. It is normally done with either FTP or NDM,
> the mainframe
> version of FTP. Normally, FTP is run in scripting language such as ksh or by
> the job
> scheduler. To call it from Cobol, you don't call FTP, you call SYSTEM to
> create a child
> process, passing it the command to run FTP and the FTP command, which will be
> MGET.



Reply With Quote
  #6  
Old 07-27-2008, 12:10 PM
William M. Klein
Guest
 
Default Re: How to send files from a mainframe to a Unix server from Cobol program?

I think that this is usually done by using the "INTRDR". I don't know if it
will help or not, but you may want to look at:

http://www.simotime.com/cblsub01.htm

--
Bill Klein
wmklein <at> ix.netcom.com
"zalek" <zalekbloom@hotmail.com> wrote in message
news:498652f6-b265-4111-96cd-8b30f0b6a29e@d45g2000hsc.googlegroups.com...
> Hello,
>
> I need to send files from a mainframe to a Unix server from a Cobol
> program. I tried to call FTP - but without success. It has to be from
> a cobol program, because number of file varies depending on daily
> activity.
> Any ideas how to do it?
>
> Thanks,
>
> Zalek



Reply With Quote
  #7  
Old 07-27-2008, 12:21 PM
Guest
 
Default Re: How to send files from a mainframe to a Unix server from Cobol program?

In article <f875bbdf-168b-4f6c-94f1-6556f1cf9924@e53g2000hsa.googlegroups.com>,
zalek <zalekbloom@hotmail.com> wrote:
>On Jul 27, 9:36*am, "Michael Mattias" <mmatt...@talsystems.com> wrote:
>> "zalek" <zalekbl...@hotmail.com> wrote in message
>>
>> news:498652f6-b265-4111-96cd-8b30f0b6a29e@d45g2000hsc.googlegroups.com...
>>
>> > Hello,

>>
>> > I need to send files from a mainframe to a Unix server from a Cobol
>> > program. I tried to call FTP - but without success. It has to be from
>> > a cobol program, because number of file varies depending on daily
>> > activity.
>> > Any ideas how to do it?

>>
>> How/why did FTP fail? I know others use FTP to do this, ergo it must be
>> do-able.


[snip]

>I am using IBM MVS mainframe. Here is the error I am getting:
>CEE3648S POSIX(ON) run-time option in a nested enclave TESTFTP is not
>supported.


The Quick entry for this error message contains:

--begin quoted text:

Programmer Response: Specify the POSIX(ON) run-time option for only the
first enclave. Make sure all nested enclaves specify POSIX(OFF).

--end quoted text

Rather than duplicate the errors, please post the code that caused this
error and things might proceed from there.

DD

Reply With Quote
  #8  
Old 07-27-2008, 12:54 PM
SkippyPB
Guest
 
Default Re: How to send files from a mainframe to a Unix server from Cobol program?

On Sun, 27 Jul 2008 16:21:40 +0000 (UTC), docdwarf@panix.com () wrote:

>In article <f875bbdf-168b-4f6c-94f1-6556f1cf9924@e53g2000hsa.googlegroups.com>,
>zalek <zalekbloom@hotmail.com> wrote:
>>On Jul 27, 9:36*am, "Michael Mattias" <mmatt...@talsystems.com> wrote:
>>> "zalek" <zalekbl...@hotmail.com> wrote in message
>>>
>>> news:498652f6-b265-4111-96cd-8b30f0b6a29e@d45g2000hsc.googlegroups.com...
>>>
>>> > Hello,
>>>
>>> > I need to send files from a mainframe to a Unix server from a Cobol
>>> > program. I tried to call FTP - but without success. It has to be from
>>> > a cobol program, because number of file varies depending on daily
>>> > activity.
>>> > Any ideas how to do it?
>>>
>>> How/why did FTP fail? I know others use FTP to do this, ergo it must be
>>> do-able.

>
>[snip]
>
>>I am using IBM MVS mainframe. Here is the error I am getting:
>>CEE3648S POSIX(ON) run-time option in a nested enclave TESTFTP is not
>>supported.

>
>The Quick entry for this error message contains:
>
>--begin quoted text:
>
>Programmer Response: Specify the POSIX(ON) run-time option for only the
>first enclave. Make sure all nested enclaves specify POSIX(OFF).
>
>--end quoted text
>
>Rather than duplicate the errors, please post the code that caused this
>error and things might proceed from there.
>
>DD


Another problem may be the system doesn't have a required APAR
installed. I found the following on IBM's website:

PQ97087: MESSAGE " CEE3648S POSIX(ON) RUN-TIME OPTION IN A NESTED
ENCLAVE REXEC IS NOT SUPPORTED. " IS ISSUED IN ZOS V1R5 AND ZOS V1R6.

The description is:

When REXEC is invoked within an application instead of a stand-
alone TSO command or via a batch job, and the application uses
the LE RTL (runtime libraries), then REXEC is considered to be
an enclave running within an enclave. In zOS V1R5, REXEC was
written in "C", and set POSIX(ON). With the implementation
described above, the following message would be issued
CEE3648S POSIX(ON) run-time option in a nested enclave REXEC
is not supported.
and the application would fail.
Invoking REXEC via TSO or batch works just fine.
KEYWORDS: REXEC CEE3648S POSIX(ON) LE OREXEC
VERIFICATION STEPS: Write an application and call REXEC via a
system() call. If above message is issued,
then this apar will address it.

Having not seen the original code that caused the error and since the
OP didn't tell us which IBM MVS system he/she was on, this is only a
guess that somehow the system thinks you are calling a REXEC routine
and the APAR to fix this problem hasn't been installed.

A workaround is:

Within the JCL that invokes the application, one may STEPLIB to
the zOS V1R4 loadlib which contains the REXEC module. Since
REXEC in V1R4 is written in PASCAL, it would have no bearing on
LE RTL.

Regards,
////
(o o)
-oOO--(_)--OOo-

"I went to a general store, but they wouldn't let me buy anything specific."
--Steven Wright
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Remove nospam to email me.

Steve
Reply With Quote
  #9  
Old 07-27-2008, 02:44 PM
Guest
 
Default Re: How to send files from a mainframe to a Unix server from Cobol program?

In article <eb9p845841pi8dcerv3e9icekinmo5ve1v@4ax.com>,
SkippyPB <swiegand@Nospam.neo.rr.com> wrote:
>On Sun, 27 Jul 2008 16:21:40 +0000 (UTC), docdwarf@panix.com () wrote:
>
>>In article <f875bbdf-168b-4f6c-94f1-6556f1cf9924@e53g2000hsa.googlegroups.com>,
>>zalek <zalekbloom@hotmail.com> wrote:
>>>On Jul 27, 9:36*am, "Michael Mattias" <mmatt...@talsystems.com> wrote:
>>>> "zalek" <zalekbl...@hotmail.com> wrote in message
>>>>
>>>> news:498652f6-b265-4111-96cd-8b30f0b6a29e@d45g2000hsc.googlegroups.com...
>>>>
>>>> > Hello,
>>>>
>>>> > I need to send files from a mainframe to a Unix server from a Cobol
>>>> > program.


[snip]

>>>I am using IBM MVS mainframe. Here is the error I am getting:
>>>CEE3648S POSIX(ON) run-time option in a nested enclave TESTFTP is not
>>>supported.

>>
>>The Quick entry for this error message contains:
>>
>>--begin quoted text:
>>
>>Programmer Response: Specify the POSIX(ON) run-time option for only the
>>first enclave. Make sure all nested enclaves specify POSIX(OFF).
>>
>>--end quoted text
>>
>>Rather than duplicate the errors, please post the code that caused this
>>error and things might proceed from there.
>>

>
>Another problem may be the system doesn't have a required APAR
>installed.


Ow ow ow... asking the Systems folks to participate can lead to
Interesting Times... but it might be necessary to do so.

(on my current site a while back I had to - based on Mr Yaeger's advice,
given in clear and unambiguous terms - ask the Systems folks to updgrade
DFSort to a version that'd allow for ICETOOL to interpret a code-set more
modern than Linear B... but I lucked out, the response was 'At last...
someone Out There *understands* us!' and now they ask into my good health
and the status of my nieces' algebra scores)

[snip]

>VERIFICATION STEPS: Write an application and call REXEC via a
> system() call. If above message is issued,
> then this apar will address it.


Hmmmmmm... smells like a right helpful hint, to me... if such skills are
to be found in the ones upon which the original poster might call.

>
>Having not seen the original code that caused the error and since the
>OP didn't tell us which IBM MVS system he/she was on, this is only a
>guess that somehow the system thinks you are calling a REXEC routine
>and the APAR to fix this problem hasn't been installed.


So... there's another that seems to say 'show what you've done', let's see
if the advice is taken.

DD

Reply With Quote
  #10  
Old 07-27-2008, 05:49 PM
zalek
Guest
 
Default Re: How to send files from a mainframe to a Unix server from Cobolprogram?

On Jul 27, 12:10*pm, "William M. Klein" <wmkl...@nospam.netcom.com>
wrote:
> I think that this is usually done by using the "INTRDR". *I don't know if it
> will help or not, but you may want to look at:
>
> * *http://www.simotime.com/cblsub01.htm
>
> --
> Bill Klein


Thanks Bill, but it is my solution to the problem I described -
unfortunately operations does not like it because it submits jobs
outside of a scheduler.

Thanks,

Zalek


> *wmklein <at> ix.netcom.com"zalek" <zalekbl...@hotmail.com> wrote in message
>
> news:498652f6-b265-4111-96cd-8b30f0b6a29e@d45g2000hsc.googlegroups.com...
>
> > Hello,

>
> > I need to send files from a mainframe to a Unix server from a Cobol
> > program. I tried to call FTP - but without success. It has to be from
> > a cobol program, because number of file varies depending on daily
> > activity.
> > Any ideas how to do it?

>
> > Thanks,

>
> > Zalek

>
>


Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 06:52 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.