Re: Perl 5.22 mvswrite Segmentation Fault

2016-09-08 Thread Karl Williamson

On 09/02/2016 12:54 AM, Yaroslav Kuzmin wrote:


 In system z/OS   function fopen() has more options  
http://www.ibm.com/support/knowledgecenter/SSLT
BW_2.1.0/com.ibm.zos.v2r1.bpxbd00/fopen.htm

This patch removes limitations in z/OS for function fopen().


Thanks, applied as 49fc490652d8b428d67872fae3acb10f0b43cff7




 Исходное сообщение 
От: "Cooper, Brandon" <b-coo...@ti.com>
Кому: Yaroslav Kuzmin <ykuz...@rocketsoftware.com>
Копия: perl-mvs@perl.org <perl-mvs@perl.org>
Тема: RE: Perl 5.22 mvswrite Segmentation Fault
Дата: Thu, 25 Aug 2016 21:32:55 +

I was able to open and write to USERBTC.OUTPUT.FILE successfully using the C 
program that uses fopen
and fwrite directly, so I don’t think either of those are the issue. The error 
that I am getting
indicates that the problem is with PerlIO_findFILE. Here is what it says:

The system detected a protection exception (System Completion Code=0C4).
 From entry point PerlIO_findFILE at compile unit offset +0076 at 
entry offset +0076
at address 122B623E

I saw in the source code for mvsopen and mvswrite 
(http://cpansearch.perl.org/src/PVHP/OS390-Stdio-0
.008/Stdio.xs) that they execute differently depending on whether the 
USE_PELRIO macro is defined.
In my PERLLIB for 5.00503, PerlIO.pm and PerlIO/ are not present, but in my 
PERLLIB for 5.8.6 and
5.22.0 they are. I am able to write to the output dataset only with 
perl5.00503, but not with 5.8.6
or 5.22.0.
So I would guess that there is some problem with PerlIO, or how OS390::Stdio 
uses PerlIO, but I’m
not sure. Do you think this is correct?

Thanks for your help,
Brandon

From: Yaroslav Kuzmin [mailto:ykuz...@rocketsoftware.com]
Sent: Thursday, August 25, 2016 1:20 AM
To: Cooper, Brandon
Subject: Re: Perl 5.22 mvswrite Segmentation Fault

Sorry . I was wrong.

mvsopen()  function is a wrapper function for fopen() 
(http://www.ibm.com/support/knowledgecenter/SS
LTBW_2.1.0/com.ibm.zos.v2r1.bpxbd00/fopen.htm)

for testing  dataset  using small porgramm on C

int main(int argc,char * argv[])
{
 char buff[105] = {"text  "};
 size_t s;

 FILE stream =  fopen("//'USERBTC.OUTPUT.FILE'","wb, lrecl=105");
 if(stream == NULL){
  printf("error open\n");
  return 0;
 }
 s = fwrite(buff,sizeof(char),105,stream);
 if( s != 105){
  printf("error write\n");
  return 0;
}
 fclose(stream);
 return 0;
}

Correctly configure parameters of the opening.

--

Regards,

Yaroslav Kuzmin
Developer C/C++ ,z/OS , Linux
3 Zhukovskiy Street · Miass, Chelyabinsk region 456318 · Russia
Tel:  +7.922.2.38.33.38
Email: ykuz...@rocketsoftware.com
Web: www.rocketsoftware.com

 Исходное сообщение 
От: "Cooper, Brandon" <b-coo...@ti.com>
Кому: Yaroslav Kuzmin <ykuz...@rocketsoftware.com>
Тема: RE: Perl 5.22 mvswrite Segmentation Fault
Дата: Mon, 22 Aug 2016 14:44:03 +

Hey Yaroslav,

Thanks for your response. Even if I don't  specify the blksize= parameter in 
mvsopen, a dataset with
a block size of 6090 is created, which is a multiple of 105.
Specifying the (blksize=105*n) parameter explicitly in mvsopen doesn't help.

In Perl5.00503 the dataset created by mvsopen can be written to whether or not 
I specify blksize (as
long as I don’t explicitly specify a blksize this is not a multiple of lrecl, 
of course).
In Perl5.22.0 the dataset created by mvsopen cannot be written to whether or 
not I specify blksize.

The only way I can write to a z/OS dataset in Perl5.22.0 is to leave off all of 
the keyword
parameters altogether, but this causes the problem of wrapping a record across 
two output records
that I mentioned previously.

Do you know if anything has changed about the implementation of mvsopen or 
mvswrite between the two
releases that might be causing this error?

Thanks for your help,
Brandon Cooper


-Original Message-
From: Yaroslav Kuzmin [mailto:ykuz...@rocketsoftware.com]
Sent: Monday, August 22, 2016 6:11 AM
To: perl-mvs@perl.org; Cooper, Brandon
Subject: Re: Perl 5.22 mvswrite Segmentation Fault

Hi,
 Parameter 'lrecl' must be a multiple parameter 'blksize'.  lrecl=105, 
blksize=(105 or 210 etc)

 look dynalloc() 
http://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxbd00
/dynalloc.htm

 --

Regards,

Yaroslav Kuzmin
Developer C/C++ ,z/OS , Linux
3 Zhukovskiy Street · Miass, Chelyabinsk region 456318 · Russia
Tel:  +7.922.2.38.33.38
Email: ykuz...@rocketsoftware.com
Web: www.rocketsoftware.com


 Исходное сообщение ----
От: "Cooper, Brandon" <b-coo...@ti.com>
Кому: perl-mvs@perl.org <perl-mvs@perl.org>
Тема: Perl 5.22 mvswrite Segmentation Fault
Дата: Tue, 16 Aug 2016 20:30:03 +

Hey guys,

I recently upgraded from Perl 5.00503 to 5.22.0. I am using the OS390::Stdio 
(version 0.008) package
to process z/OS datasets record by record. Previously, I was able to open my 
output dataset as
follows:

my $o

Re: Perl 5.22 mvswrite Segmentation Fault

2016-09-02 Thread Yaroslav Kuzmin

 In system z/OS   function fopen() has more options  
http://www.ibm.com/support/knowledgecenter/SSLT
BW_2.1.0/com.ibm.zos.v2r1.bpxbd00/fopen.htm

This patch removes limitations in z/OS for function fopen().



 Исходное сообщение 
От: "Cooper, Brandon" <b-coo...@ti.com>
Кому: Yaroslav Kuzmin <ykuz...@rocketsoftware.com>
Копия: perl-mvs@perl.org <perl-mvs@perl.org>
Тема: RE: Perl 5.22 mvswrite Segmentation Fault
Дата: Thu, 25 Aug 2016 21:32:55 +

I was able to open and write to USERBTC.OUTPUT.FILE successfully using the C 
program that uses fopen
and fwrite directly, so I don’t think either of those are the issue. The error 
that I am getting
indicates that the problem is with PerlIO_findFILE. Here is what it says:

The system detected a protection exception (System Completion Code=0C4).
 From entry point PerlIO_findFILE at compile unit offset +0076 at 
entry offset +0076
at address 122B623E

I saw in the source code for mvsopen and mvswrite 
(http://cpansearch.perl.org/src/PVHP/OS390-Stdio-0
.008/Stdio.xs) that they execute differently depending on whether the 
USE_PELRIO macro is defined.
In my PERLLIB for 5.00503, PerlIO.pm and PerlIO/ are not present, but in my 
PERLLIB for 5.8.6 and
5.22.0 they are. I am able to write to the output dataset only with 
perl5.00503, but not with 5.8.6
or 5.22.0.
So I would guess that there is some problem with PerlIO, or how OS390::Stdio 
uses PerlIO, but I’m
not sure. Do you think this is correct?

Thanks for your help,
Brandon

From: Yaroslav Kuzmin [mailto:ykuz...@rocketsoftware.com]
Sent: Thursday, August 25, 2016 1:20 AM
To: Cooper, Brandon
Subject: Re: Perl 5.22 mvswrite Segmentation Fault

Sorry . I was wrong.

mvsopen()  function is a wrapper function for fopen() 
(http://www.ibm.com/support/knowledgecenter/SS
LTBW_2.1.0/com.ibm.zos.v2r1.bpxbd00/fopen.htm)

for testing  dataset  using small porgramm on C

int main(int argc,char * argv[])
{
 char buff[105] = {"text  "};
 size_t s;

 FILE stream =  fopen("//'USERBTC.OUTPUT.FILE'","wb, lrecl=105");
 if(stream == NULL){
  printf("error open\n");
  return 0;
 }
 s = fwrite(buff,sizeof(char),105,stream);
 if( s != 105){
  printf("error write\n");
  return 0;
}
 fclose(stream);
 return 0;
}

Correctly configure parameters of the opening.

--

Regards,

Yaroslav Kuzmin
Developer C/C++ ,z/OS , Linux
3 Zhukovskiy Street · Miass, Chelyabinsk region 456318 · Russia
Tel:  +7.922.2.38.33.38
Email: ykuz...@rocketsoftware.com
Web: www.rocketsoftware.com

 Исходное сообщение 
От: "Cooper, Brandon" <b-coo...@ti.com>
Кому: Yaroslav Kuzmin <ykuz...@rocketsoftware.com>
Тема: RE: Perl 5.22 mvswrite Segmentation Fault
Дата: Mon, 22 Aug 2016 14:44:03 +

Hey Yaroslav,

Thanks for your response. Even if I don't  specify the blksize= parameter in 
mvsopen, a dataset with
a block size of 6090 is created, which is a multiple of 105.
Specifying the (blksize=105*n) parameter explicitly in mvsopen doesn't help.

In Perl5.00503 the dataset created by mvsopen can be written to whether or not 
I specify blksize (as
long as I don’t explicitly specify a blksize this is not a multiple of lrecl, 
of course).
In Perl5.22.0 the dataset created by mvsopen cannot be written to whether or 
not I specify blksize.

The only way I can write to a z/OS dataset in Perl5.22.0 is to leave off all of 
the keyword
parameters altogether, but this causes the problem of wrapping a record across 
two output records
that I mentioned previously.

Do you know if anything has changed about the implementation of mvsopen or 
mvswrite between the two
releases that might be causing this error?

Thanks for your help,
Brandon Cooper


-Original Message-
From: Yaroslav Kuzmin [mailto:ykuz...@rocketsoftware.com]
Sent: Monday, August 22, 2016 6:11 AM
To: perl-mvs@perl.org; Cooper, Brandon
Subject: Re: Perl 5.22 mvswrite Segmentation Fault

Hi,
 Parameter 'lrecl' must be a multiple parameter 'blksize'.  lrecl=105, 
blksize=(105 or 210 etc)

 look dynalloc() 
http://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxbd00
/dynalloc.htm

 --

Regards,

Yaroslav Kuzmin
Developer C/C++ ,z/OS , Linux
3 Zhukovskiy Street · Miass, Chelyabinsk region 456318 · Russia
Tel:  +7.922.2.38.33.38
Email: ykuz...@rocketsoftware.com
Web: www.rocketsoftware.com


 Исходное сообщение ----
От: "Cooper, Brandon" <b-coo...@ti.com>
Кому: perl-mvs@perl.org <perl-mvs@perl.org>
Тема: Perl 5.22 mvswrite Segmentation Fault
Дата: Tue, 16 Aug 2016 20:30:03 +

Hey guys,

I recently upgraded from Perl 5.00503 to 5.22.0. I am using the OS390::Stdio 
(version 0.008) package
to process z/OS datasets record by record. Previously, I was able to open my 
output dataset as
follows:

my $outfh = mvsopen("//'USERBTC.OUTPUT.FILE'","wb, lrecl=105") or die $!;

and write to it with:

Re: Perl 5.22 mvswrite Segmentation Fault

2016-08-22 Thread Yaroslav Kuzmin
Hi,
 Parameter 'lrecl' must be a multiple parameter 'blksize'.  lrecl=105, 
blksize=(105 or 210 etc)

 look dynalloc() 
http://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxbd00
/dynalloc.htm

 --

Regards,

Yaroslav Kuzmin
Developer C/C++ ,z/OS , Linux
3 Zhukovskiy Street · Miass, Chelyabinsk region 456318 · Russia
Tel:  +7.922.2.38.33.38
Email: ykuz...@rocketsoftware.com
Web: www.rocketsoftware.com


 Исходное сообщение 
От: "Cooper, Brandon" <b-coo...@ti.com>
Кому: perl-mvs@perl.org <perl-mvs@perl.org>
Тема: Perl 5.22 mvswrite Segmentation Fault
Дата: Tue, 16 Aug 2016 20:30:03 +

Hey guys,

I recently upgraded from Perl 5.00503 to 5.22.0. I am using the OS390::Stdio 
(version 0.008) package
to process z/OS datasets record by record. Previously, I was able to open my 
output dataset as
follows:

my $outfh = mvsopen("//'USERBTC.OUTPUT.FILE'","wb, lrecl=105") or die $!;

and write to it with:

mvswrite($outfh, $record, 105) or die $!;

However when using Perl 5.22.0, I am now getting an Abend S0C4-X'4' (Protection 
Exception) error
while using mvswrite(), unless I remove the lrecl=105 parameter from mvsopen().
However when I do this, mvsopen() creates a dataset with  lrecl=80 and wraps 
the 105 byte input
record across two output records.

Does anybody know if keyword parameters  are supported in mvsopen()  for Perl 
5.22.0, and if so how
do I specify them?


Thanks for your help,
Brandon Cooper
Mainframe Admin | IT Operations
Texas Instruments




Rocket Software, Inc. and subsidiaries ■ 77 Fourth Avenue, Waltham MA 02451 ■ 
+1 877.328.2932 ■ +1 781.577.4321
Unsubscribe From Commercial Email – unsubscr...@rocketsoftware.com
Manage Your Subscription Preferences - 
http://info.rocketsoftware.com/GlobalSubscriptionManagementEmailFooter_SubscriptionCenter.html
Privacy Policy - http://www.rocketsoftware.com/company/legal/privacy-policy


This communication and any attachments may contain confidential information of 
Rocket Software, Inc. All unauthorized use, disclosure or distribution is 
prohibited. If you are not the intended recipient, please notify Rocket 
Software immediately and destroy all copies of this communication. Thank you.