S002 RC=4 Abend Reading file

Discussion of the free COZBATCH utility for z/OS
Post Reply
BobC
Posts: 10
Joined: Fri Mar 04, 2011 9:57 am

S002 RC=4 Abend Reading file

Post by BobC » Tue Jan 10, 2012 2:16 pm

We use FTP to transfer PDS's from one z/OS system to another. We first offload the PDS to a flat file, transfer the data and then send JCL to restore the file on the target system. This is all scripted and has been working for us for many years. I've been able to do this with COZBATCH on source type PDS files, but when I tried to send a LOADLIB, I got the following:

Code: Select all

ZosDataset.I.: Opening dataset DD:SYSUT1 for read
CEE3250C The system or user abend S002  R=00000004 was issued.
         From entry point ZosDataset::read(unsigned long long,char*,unsigned int) at compile unit offset +00000362 at
         entry offset +00000362 at address 10598BF2.
CoZBatch.I.: returning rc=exitcode=146
These are the attributes of the file (from a REXX script):

Code: Select all

LRECL=32760
USED=1
DSORG=PS
RECFM=VS
DSN=BCOH.LINKLIB.D12010.T135948
UNIT=3390
BLKSIZE=32760
ALLOCATED=1
PRIMARY=1
SECONDARY=1
ALLOCATION UNITS=CYLINDER
and these are the statements generated from within the script:

Code: Select all

. $CONFIG
cozsftp $SSH_OPTS bcoh@zosha2 <<EOB
lzopts mode=text,lrecl=32760,blksize=32760
lzopts recfm=VS,linerule=ibmrdw,notrim
zopts mode=text,lrecl=32760,blksize=32760,space=cyl.1.1
zopts recfm=VS,linerule=ibmrdw,notrim
put //DD:SYSUT1 //BCOH.LINKLIB.D12010.T135948
lzopts lrecl=80,blksize=27920,recfm=fb,linerule=none
zopts lrecl=80,blksize=27920,recfm=fb,linerule=none
zopts sysout=a,writer=intrdr
put //dd:JCL //SYSOUT
EOB
Where do I go from here?
Thanks

dovetail
Site Admin
Posts: 1848
Joined: Thu Jul 29, 2004 12:12 pm

Re: S002 RC=4 Abend Reading file

Post by dovetail » Wed Jan 11, 2012 10:58 am

The ABEND (S002-04) seems to be related to the dataset pointed by SYSUT1 in the client batch job, and not the target dataset on the remote system.

You should be able to confirm by looking at the IEC036I message in the job log.

Referring to the info for this message/code:
04 One of the following occurred:
v An incorrect record was
encountered during a QSAM GET
operation. The data set consists of
variable format records. The length
field in the record descriptor word
(RDW) is incorrect for one of the
following reasons:
– The RDW specifies a length less
than 4.
– The RDW specifies a length
greater than the DCBLRECL
value that was specified when
the data set was opened.
DCBLRECL is the logical record
length (LRECL) in the data
control block (DCB).
v QSAM tried to read segments of
variable spanned records that are
not in proper sequence.
v LRECL is not large enough.
v The record area in QSAM locate
mode is too small to contain a
logical record from a
spanned-format data set.
v The BDW contained a length
greater than the blocksize specified
in the data control block (DCB).
So, I would assume that there is a problem with either the SYSUT1 dataset, or perhaps you are overriding its DCB in the JCL in a manner incompatible with the underlying data.

BobC
Posts: 10
Joined: Fri Mar 04, 2011 9:57 am

Re: S002 RC=4 Abend Reading file

Post by BobC » Wed Jan 11, 2012 11:55 am

So, I would assume that there is a problem with either the SYSUT1 dataset, or perhaps you are overriding its DCB in the JCL in a manner incompatible with the underlying data.
I would normally agree with you but I'm not overridding the DCB

Generated JCL:

Code: Select all

//BCOHSFTP JOB FTN,'COHO',MSGCLASS=X,CLASS=A,REGION=0M
//JOBLIB    DD DISP=SHR,DSN=COZ.LOADLIB
//RUNSFTP EXEC PGM=COZBATCH
//SYSOUT    DD SYSOUT=*
//STDIN DD *
cozsftp rdc2@zosha2 <<EOB
lzopts mode=text,lrecl=32760,blksize=32760
lzopts recfm=VS,linerule=ibmrdw,notrim
zopts mode=text,lrecl=32760,blksize=32760,space=cyl.1.1
zopts recfm=VS,linerule=ibmrdw,notrim
put //DD:SYSUT1 //BCOH.LINKLIB.D12011.T112656
EOB
//SYSUT1 DD DSN=BCOH.LINKLIB.D12011.T112656,DISP=SHR
ISPF 3.4 info in the file:

Code: Select all

Data Set Name . . . . : BCOH.LINKLIB.D12011.T112656

General Data                           Current Allocation
 Management class . . : RELSPACE        Allocated cylinders : 1
 Storage class  . . . : PRIME           Allocated extents . : 1
  Volume serial . . . : SMS019
  Device type . . . . : 3390
 Data class . . . . . : SMALL
  Organization  . . . : PS             Current Utilization
  Record format . . . : VS              Used cylinders  . . : 1
  Record length . . . : 32760           Used extents  . . . : 1
  Block size  . . . . : 32760
  1st extent cylinders: 1
  Secondary cylinders : 1              Dates
  Data set name type  :                 Creation date . . . : 2012/01/11
  SMS Compressible. . : NO              Referenced date . . : 2012/01/11
                                        Expiration date . . : ***None***
And FTP reads the dataset with no problem, so I don't think there's anything wrong with SYSUT1. The following worked:

Code: Select all

//BCOHCPY  JOB FTN,'BOB COHO            ',MSGCLASS=X,CLASS=A,
//           REGION=6M
//FTP   EXEC  PGM=FTP,PARM='ZOSHA2 (EXIT)'
//STEPLIB DD DISP=SHR,DSN=CEE.SCEERUN
//SYSPRINT DD  SYSOUT=*
//OUTPUT   DD  SYSOUT=*
//INPUT    DD  *
uuuu
pppppppp
TYPE E
MODE B
QUO SITE CYL PRI=1 SEC=1
PUT //DD:SYSUT1 'BCOH.LINKLIB.D12011.T112656'
QUIT
//SYSUT1 DD DSN=BCOH.LINKLIB.D12011.T112656,DISP=SHR

dovetail
Site Admin
Posts: 1848
Joined: Thu Jul 29, 2004 12:12 pm

Re: S002 RC=4 Abend Reading file

Post by dovetail » Wed Jan 11, 2012 2:41 pm

Please turn on debugging to get some diagnostic information by adding the following to the beginning of your //STDIN:

export COZ_LOG=T

BobC
Posts: 10
Joined: Fri Mar 04, 2011 9:57 am

Re: S002 RC=4 Abend Reading file

Post by BobC » Wed Jan 11, 2012 3:31 pm

dovetail wrote:Please turn on debugging to get some diagnostic information by adding the following to the beginning of your //STDIN:

export COZ_LOG=T
I did that but their was nothing in /tmp. There are CEEDUMP files in the user's home folder as well as the following in SYSOUT.

Code: Select all

CoZBatch[N]: Copyright (C) 2005-2009 Dovetailed Technologies LLC. All rights reserved.
CoZBatch[N]: version 1.10.0 2011-09-08
CoZBatch[I]: executing progname=login-shell="-/bin/sh"
Co:Z SFTP version: 1.10.0 (5.0p1) 2011-09-08
Copyright (C) Dovetailed Technologies, LLC. 2011. All rights reserved.
ZosSettings[T]: -> readConfiguration()
ZosSettings[T]: -> processConfigurationFile(/u/rdc2/.ssh/cozsftp_config)
ZosSettings[D]: no configuration file (/u/rdc2/.ssh/cozsftp_config) found.
ZosSettings[T]: <- processConfigurationFile()
ZosSettings[T]: -> processConfigurationFile(/etc/ssh/cozsftp_config)
ZosSettings[T]:    processConfigurationFile: Processing fixed: configuration file section
ZosSettings[T]:    processConfigurationFile: Processing default: configuration file section
ZosSettings[T]:    processConfigurationFile: Processing configuration file option: 'ssh-le-options=HEAP(8M,1M,,FREE),ENV
AR("_CEE_REALLOC_CONTROL=256K,25")'
ZosSettings[T]: <- processConfigurationFile()
ZosSettings[T]: <- readConfiguration()
ZosUtil[T]: -> zos_log_region_size()
ZosUtil[D]: region size requested = 0K, Actual below/above limit = 9192K / 1838080K
ZosUtil[T]: <- zos_log_region_size()
Connecting to zosha2...
cozsftp> lzopts mode=text,lrecl=32760,blksize=32760
 blksize=32760   lrecl=32760     mode=text
cozsftp> lzopts recfm=VS,linerule=ibmrdw,notrim
 linerule=ibmrdw     notrim              recfm=VS
cozsftp> zopts mode=text,lrecl=32760,blksize=32760,space=cyl.1.1
 blksize=32760   lrecl=32760     mode=text       space=cyl.1.1
cozsftp> zopts recfm=VS,linerule=ibmrdw,notrim
ZosDataset[T]: -> open("//DD:SYSUT1", 0x0002, 0x0000)
 linerule=ibmrdw     notrim              recfm=VS
cozsftp> put //DD:SYSUT1 //BCOH.LINKLIB.D12011.T112656
Uploading //DD:SYSUT1 to //BCOH.LINKLIB.D12011.T112656
DatasetHandler[T]: -> setDSN(DD:SYSUT1)
DatasetHandler[T]: <- setDSN(effectiveDSN=DD:SYSUT1)
ZosDataset[I]: Opening dataset DD:SYSUT1 for read
DatasetHandler[T]: -> open()
DatasetHandler[T]: <- open()
ZosDataset[T]: <- open()
ZosDataset[T]: -> read(off=0 len=32768)
ZosDataset[T]: <- read(32768)
ZosDataset[T]: -> read(off=32768 len=32768)
ZosDataset[T]: <- read(32768)
ZosDataset[T]: -> read(off=65536 len=32768)
ZosDataset[T]: <- read(32768)
ZosDataset[T]: -> read(off=98304 len=32768)
ZosDataset[T]: <- read(32768)
ZosDataset[T]: -> read(off=131072 len=32768)
ZosDataset[T]: <- read(32768)
ZosDataset[T]: -> read(off=163840 len=32768)
ZosDataset[T]: <- read(32768)
ZosDataset[T]: -> read(off=196608 len=32768)
ZosDataset[T]: <- read(32768)
ZosDataset[T]: -> read(off=229376 len=32768)
ZosDataset[T]: <- read(32768)
ZosDataset[T]: -> read(off=262144 len=32768)
ZosDataset[T]: <- read(32768)
ZosDataset[T]: -> read(off=294912 len=32768)
CEE3250C The system or user abend S002  R=00000004 was issued.
         From entry point ZosDataset::read(unsigned long long,char*,unsigned int) at compile unit offset +00000362 at
         entry offset +00000362 at address 105A5BF2.
CoZBatch[I]: returning rc=exitcode=146

dovetail
Site Admin
Posts: 1848
Joined: Thu Jul 29, 2004 12:12 pm

Re: S002 RC=4 Abend Reading file

Post by dovetail » Wed Jan 11, 2012 4:48 pm

I wasn't able to reproduce this on my system, so I think that it may be something data dependent.
Co:Z SFTP uses the IBM C library for dataset I/O, and I'm reasonably sure that the ABEND is really occurring there.

Can you try another test to produce a low-level trace?

Just run COZBATCH with the same SYSUT1 dataset, but have

// EXEC PGM=COZBATCH
//SYSUT1 DD DSN=...,DISP=SHR
//CEEDUMP DD SYSOUT=*
//STDIN DD *
export COZ_LOG=F,RecordStreamer=F
fromdsn //kirk.testvs.data | wc
//

This may produce a large trace file, so please email it along with the CEEDUMP LE-formatted DUMP in a zip file to info@dovetail.com rather than posting.

PS> Its a little unusual to have RECFM=VS,LRECL=32760,BLKSIZE=32760. SMF dumps, for example usually use RECFM=VBS

BobC
Posts: 10
Joined: Fri Mar 04, 2011 9:57 am

Re: S002 RC=4 Abend Reading file

Post by BobC » Thu Jan 12, 2012 8:11 am

PS> Its a little unusual to have RECFM=VS,LRECL=32760,BLKSIZE=32760. SMF dumps, for example usually use RECFM=VBS
This is the standard way that IEBCOPY creates a flat file from a pds in z/OS 1.11. You can create a file to test with called TEST.LINKLIB.TRANSFER with the following JCL:

Code: Select all

//STEP0010 EXEC  PGM=IEFBR14
//FILE      DD DISP=(NEW,PASS),DSN=&&TEST,
//          DCB=(BLKSIZE=32760,DSORG=PO,RECFM=U),
//          SPACE=(32760,(10,0,45))
//STEP0020  EXEC PGM=IEBCOPY
//SYSPRINT  DD SYSOUT=X
//FILEI     DD DISP=SHR,DSN=SYS1.LINKLIB
//FILEO     DD DISP=(OLD,PASS),DSN=&&TEST
//SYSUT3    DD UNIT=SYSDA,SPACE=(TRK,(1,1))
//SYSUT4    DD UNIT=SYSDA,SPACE=(TRK,(1,1))
//SYSIN     DD *
   COPY INDD=FILEI,OUTDD=FILEO
   SELECT MEMBER=(,                                                    X
    (IRRADU86,,R))
//UNCT0030 EXEC PGM=IEFBR14
//SYSUT2   DD  DSN=TEST.LINKLIB.TRANSFER,
//             DISP=(MOD,DELETE),SPACE=(TRK,0)
//STEP0030 EXEC PGM=IEBCOPY
//SYSPRINT   DD SYSOUT=*
//SYSUT1     DD DISP=(OLD,DELETE,DELETE),DSN=&&TEST
//SYSUT2     DD DISP=(,CATLG),
//             SPACE=(CYL,(1,1)),
//             DSN=TEST.LINKLIB.TRANSFER
//SYSUT3     DD UNIT=SYSDA,SPACE=(TRK,(60))
//SYSIN      DD DUMMY
Here is the output with the options you requested:

Code: Select all

CoZBatch[N]: Copyright (C) 2005-2009 Dovetailed Technologies LLC. All rights reserved.
CoZBatch[N]: version 1.10.0 2011-09-08
CoZBatch[I]: executing progname=login-shell="-/bin/sh"
Co:Z SFTP version: 1.10.0 (5.0p1) 2011-09-08
Copyright (C) Dovetailed Technologies, LLC. 2011. All rights reserved.
ZosSettings[T]: -> readConfiguration()
ZosSettings[T]: -> processConfigurationFile(/u/rdc2/.ssh/cozsftp_config)
ZosSettings[D]: no configuration file (/u/rdc2/.ssh/cozsftp_config) found.
ZosSettings[T]: <- processConfigurationFile()
ZosSettings[T]: -> processConfigurationFile(/etc/ssh/cozsftp_config)
ZosSettings[T]:    processConfigurationFile: Processing fixed: configuration file section
ZosSettings[T]:    processConfigurationFile: Processing default: configuration file section
ZosSettings[T]:    processConfigurationFile: Processing configuration file option: 'ssh-le-options=HEAP(8M,1M,,FREE),ENV
AR("_CEE_REALLOC_CONTROL=256K,25")'
ZosSettings[T]: <- processConfigurationFile()
ZosSettings[T]: <- readConfiguration()
ZosUtil[T]: -> zos_log_region_size()
ZosUtil[D]: region size requested = 0K, Actual below/above limit = 9192K / 1838080K
ZosUtil[T]: <- zos_log_region_size()
Connecting to zosha2...
cozsftp> lzopts mode=text,lrecl=32760,blksize=32760
 blksize=32760   lrecl=32760     mode=text
cozsftp> lzopts recfm=VS,linerule=ibmrdw,notrim
 linerule=ibmrdw     notrim              recfm=VS
cozsftp> zopts mode=text,lrecl=32760,blksize=32760,space=cyl.1.1
 blksize=32760   lrecl=32760     mode=text       space=cyl.1.1
cozsftp> zopts recfm=VS,linerule=ibmrdw,notrim
ZosDataset[T]: -> open("//DD:SYSUT1", 0x0002, 0x0000)
 linerule=ibmrdw     notrim              recfm=VS
cozsftp> put //DD:SYSUT1 //BCOH.LINKLIB.D12011.T112656
Uploading //DD:SYSUT1 to //BCOH.LINKLIB.D12011.T112656
DatasetHandler[T]: -> setDSN(DD:SYSUT1)
DatasetHandler[T]: <- setDSN(effectiveDSN=DD:SYSUT1)
RecordStreamer[T]: -> RecordStreamer()
RecordStreamer[F]: -> setTrim(true)
RecordStreamer[F]: <- setTrim()
RecordStreamer[T]: <- RecordStreamer()
RecordStreamer[F]: -> setSourceCodePage(IBM-1047)
RecordStreamer[F]: <- setSourceCodePage()
RecordStreamer[F]: -> setTargetCodePage(IBM-1047)
RecordStreamer[F]: <- setTargetCodePage()
RecordStreamer[F]: -> setTrim(false)
RecordStreamer[F]: <- setTrim()
RecordStreamer[F]: -> initialize()
RecordStreamer[F]: -> setPadChar(0x40)
RecordStreamer[F]: <- setPadChar()
RecordStreamer[D]: initialize(): sourceCodePage="IBM-1047"(0), targetCodePage="IBM-1047"(0), haveTranslateTable=no,
trim=no, srcSp=0x40, tgtCr=0xD, tgtNl=0x15, tgtLf=0x25, lineTerm=8
RecordStreamer[F]: <- initialize()
ZosDataset[I]: Opening dataset DD:SYSUT1 for read
DatasetHandler[T]: -> open()
DatasetHandler[T]: <- open()
ZosDataset[T]: <- open()
ZosDataset[T]: -> read(off=0 len=32768)
RecordStreamer[F]: -> streamRecord(recordCount=1 recLen=56 bufLen=32768)
RecordStreamer[F]: <- streamRecord(60)
RecordStreamer[F]: -> streamRecord(recordCount=2 recLen=276 bufLen=32708)
RecordStreamer[F]: <- streamRecord(280)
RecordStreamer[F]: -> streamRecord(recordCount=3 recLen=2772 bufLen=32428)
RecordStreamer[F]: <- streamRecord(2776)
RecordStreamer[F]: -> streamRecord(recordCount=4 recLen=714 bufLen=29652)
RecordStreamer[F]: <- streamRecord(718)
RecordStreamer[F]: -> streamRecord(recordCount=5 recLen=882 bufLen=28934)
RecordStreamer[F]: <- streamRecord(886)
RecordStreamer[F]: -> streamRecord(recordCount=6 recLen=878 bufLen=28048)
RecordStreamer[F]: <- streamRecord(882)
RecordStreamer[F]: -> streamRecord(recordCount=7 recLen=4256 bufLen=27166)
RecordStreamer[F]: <- streamRecord(4260)
RecordStreamer[F]: -> streamRecord(recordCount=8 recLen=9916 bufLen=22906)
RecordStreamer[F]: <- streamRecord(9920)
RecordStreamer[F]: -> streamRecord(recordCount=9 recLen=5604 bufLen=12986)
RecordStreamer[F]: <- streamRecord(5608)
RecordStreamer[F]: -> streamRecord(recordCount=10 recLen=29190 bufLen=7378)
RecordStreamer[F]: <- streamRecord(-1)
RecordStreamer[F]: -> streamRecord(recordCount=10 recLen=29190 bufLen=65536)
RecordStreamer[F]: <- streamRecord(29194)
ZosDataset[T]: <- read(32768)
ZosDataset[T]: -> read(off=32768 len=32768)
RecordStreamer[F]: -> streamRecord(recordCount=11 recLen=934 bufLen=10952)
RecordStreamer[F]: <- streamRecord(938)
RecordStreamer[F]: -> streamRecord(recordCount=12 recLen=3408 bufLen=10014)
RecordStreamer[F]: <- streamRecord(3412)
RecordStreamer[F]: -> streamRecord(recordCount=13 recLen=3972 bufLen=6602)
RecordStreamer[F]: <- streamRecord(3976)
RecordStreamer[F]: -> streamRecord(recordCount=14 recLen=838 bufLen=2626)
RecordStreamer[F]: <- streamRecord(842)
RecordStreamer[F]: -> streamRecord(recordCount=15 recLen=18574 bufLen=1784)
RecordStreamer[F]: <- streamRecord(-1)
RecordStreamer[F]: -> streamRecord(recordCount=15 recLen=18574 bufLen=65536)
RecordStreamer[F]: <- streamRecord(18578)
ZosDataset[T]: <- read(32768)
ZosDataset[T]: -> read(off=65536 len=32768)
RecordStreamer[F]: -> streamRecord(recordCount=16 recLen=32000 bufLen=15974)
RecordStreamer[F]: <- streamRecord(-1)
RecordStreamer[F]: -> streamRecord(recordCount=16 recLen=32000 bufLen=65536)
RecordStreamer[F]: <- streamRecord(32004)
ZosDataset[T]: <- read(32768)
ZosDataset[T]: -> read(off=98304 len=32768)
RecordStreamer[F]: -> streamRecord(recordCount=17 recLen=6696 bufLen=16738)
RecordStreamer[F]: <- streamRecord(6700)
RecordStreamer[F]: -> streamRecord(recordCount=18 recLen=3828 bufLen=10038)
RecordStreamer[F]: <- streamRecord(3832)
RecordStreamer[F]: -> streamRecord(recordCount=19 recLen=12274 bufLen=6206)
RecordStreamer[F]: <- streamRecord(-1)
RecordStreamer[F]: -> streamRecord(recordCount=19 recLen=12274 bufLen=65536)
RecordStreamer[F]: <- streamRecord(12278)
ZosDataset[T]: <- read(32768)
ZosDataset[T]: -> read(off=131072 len=32768)
RecordStreamer[F]: -> streamRecord(recordCount=20 recLen=2034 bufLen=26696)
RecordStreamer[F]: <- streamRecord(2038)
RecordStreamer[F]: -> streamRecord(recordCount=21 recLen=2034 bufLen=24658)
RecordStreamer[F]: <- streamRecord(2038)
RecordStreamer[F]: -> streamRecord(recordCount=22 recLen=6962 bufLen=22620)
RecordStreamer[F]: <- streamRecord(6966)
RecordStreamer[F]: -> streamRecord(recordCount=23 recLen=6758 bufLen=15654)
RecordStreamer[F]: <- streamRecord(6762)
RecordStreamer[F]: -> streamRecord(recordCount=24 recLen=2034 bufLen=8892)
RecordStreamer[F]: <- streamRecord(2038)
RecordStreamer[F]: -> streamRecord(recordCount=25 recLen=4672 bufLen=6854)
RecordStreamer[F]: <- streamRecord(4676)
RecordStreamer[F]: -> streamRecord(recordCount=26 recLen=19014 bufLen=2178)
RecordStreamer[F]: <- streamRecord(-1)
RecordStreamer[F]: -> streamRecord(recordCount=26 recLen=19014 bufLen=65536)
RecordStreamer[F]: <- streamRecord(19018)
ZosDataset[T]: <- read(32768)
ZosDataset[T]: -> read(off=163840 len=32768)
RecordStreamer[F]: -> streamRecord(recordCount=27 recLen=878 bufLen=15928)
RecordStreamer[F]: <- streamRecord(882)
RecordStreamer[F]: -> streamRecord(recordCount=28 recLen=766 bufLen=15046)
RecordStreamer[F]: <- streamRecord(770)
RecordStreamer[F]: -> streamRecord(recordCount=29 recLen=766 bufLen=14276)
RecordStreamer[F]: <- streamRecord(770)
RecordStreamer[F]: -> streamRecord(recordCount=30 recLen=9914 bufLen=13506)
RecordStreamer[F]: <- streamRecord(9918)
RecordStreamer[F]: -> streamRecord(recordCount=31 recLen=646 bufLen=3588)
RecordStreamer[F]: <- streamRecord(650)
RecordStreamer[F]: -> streamRecord(recordCount=32 recLen=1942 bufLen=2938)
RecordStreamer[F]: <- streamRecord(1946)
RecordStreamer[F]: -> streamRecord(recordCount=33 recLen=6113 bufLen=992)
RecordStreamer[F]: <- streamRecord(-1)
RecordStreamer[F]: -> streamRecord(recordCount=33 recLen=6113 bufLen=65536)
RecordStreamer[F]: <- streamRecord(6117)
ZosDataset[T]: <- read(32768)
ZosDataset[T]: -> read(off=196608 len=32768)
RecordStreamer[F]: -> streamRecord(recordCount=34 recLen=5980 bufLen=27643)
RecordStreamer[F]: <- streamRecord(5984)
RecordStreamer[F]: -> streamRecord(recordCount=35 recLen=3090 bufLen=21659)
RecordStreamer[F]: <- streamRecord(3094)
RecordStreamer[F]: -> streamRecord(recordCount=36 recLen=4976 bufLen=18565)
RecordStreamer[F]: <- streamRecord(4980)
RecordStreamer[F]: -> streamRecord(recordCount=37 recLen=26407 bufLen=13585)
RecordStreamer[F]: <- streamRecord(-1)
RecordStreamer[F]: -> streamRecord(recordCount=37 recLen=26407 bufLen=65536)
RecordStreamer[F]: <- streamRecord(26411)
ZosDataset[T]: <- read(32768)
ZosDataset[T]: -> read(off=229376 len=32768)
RecordStreamer[F]: -> streamRecord(recordCount=38 recLen=4948 bufLen=19942)
RecordStreamer[F]: <- streamRecord(4952)
RecordStreamer[F]: -> streamRecord(recordCount=39 recLen=8378 bufLen=14990)
RecordStreamer[F]: <- streamRecord(8382)
RecordStreamer[F]: -> streamRecord(recordCount=40 recLen=3812 bufLen=6608)
RecordStreamer[F]: <- streamRecord(3816)
RecordStreamer[F]: -> streamRecord(recordCount=41 recLen=2058 bufLen=2792)
RecordStreamer[F]: <- streamRecord(2062)
RecordStreamer[F]: -> streamRecord(recordCount=42 recLen=4952 bufLen=730)
RecordStreamer[F]: <- streamRecord(-1)
RecordStreamer[F]: -> streamRecord(recordCount=42 recLen=4952 bufLen=65536)
RecordStreamer[F]: <- streamRecord(4956)
ZosDataset[T]: <- read(32768)
ZosDataset[T]: -> read(off=262144 len=32768)
RecordStreamer[F]: -> streamRecord(recordCount=43 recLen=7693 bufLen=28542)
RecordStreamer[F]: <- streamRecord(7697)
RecordStreamer[F]: -> streamRecord(recordCount=44 recLen=1822 bufLen=20845)
RecordStreamer[F]: <- streamRecord(1826)
RecordStreamer[F]: -> streamRecord(recordCount=45 recLen=814 bufLen=19019)
RecordStreamer[F]: <- streamRecord(818)
RecordStreamer[F]: -> streamRecord(recordCount=46 recLen=25529 bufLen=18201)
RecordStreamer[F]: <- streamRecord(-1)
RecordStreamer[F]: -> streamRecord(recordCount=46 recLen=25529 bufLen=65536)
RecordStreamer[F]: <- streamRecord(25533)
ZosDataset[T]: <- read(32768)
ZosDataset[T]: -> read(off=294912 len=32768)
CEE3250C The system or user abend S002  R=00000004 was issued.
         From entry point ZosDataset::read(unsigned long long,char*,unsigned int) at compile unit offset +00000362 at
         entry offset +00000362 at address 10532BF2.
CoZBatch[I]: returning rc=exitcode=146

dovetail
Site Admin
Posts: 1848
Joined: Thu Jul 29, 2004 12:12 pm

Re: S002 RC=4 Abend Reading file

Post by dovetail » Thu Jan 12, 2012 10:17 am

I'm not certain, but I think that there is a chance that the IBM C-Library is detecting a read error but Co:Z is not handling it properly. This was a bug that was fixed in 1.10.1:

http://dovetail.com/docs/cozinstall/changes.html
Co:Z Toolkit 1.10.1 - November 7, 2011
...
o Fixed a problem in dataset code where a read error might not be detected.

It doesn't sound like there is an actual read error, but running with the fixed code may tell us something more about why the C-Library is having a problem with this particular dataset.

BobC
Posts: 10
Joined: Fri Mar 04, 2011 9:57 am

Re: S002 RC=4 Abend Reading file

Post by BobC » Thu Jan 12, 2012 10:59 am

I tried to use IDCAMS to print out this dataset and it, too got the S002 RC4. I reran overriding the DCB to RECFM=U and was able to PRINT the dataset. I used the same override to transfer with COSBATCH/cozsftp and it transferred.
However, IEBCOPY failed on the target system.

I replaced IEBCOPY with AMATERSE in my script in both the sender and target JCL and it works great with COZBATCH/cozsftp.

I will still work with you if you want to pursue this issue... it's up to you as I have a valid work-around.

Here is the syslog after installing 1.10.1

Code: Select all

CoZBatch[N]: Copyright (C) 2005-2009 Dovetailed Technologies LLC. All rights reserved.
CoZBatch[N]: version 1.10.1 2011-11-07
CoZBatch[I]: executing progname=login-shell="-/bin/sh"
Co:Z SFTP version: 1.10.1 (5.0p1) 2011-11-07
Copyright (C) Dovetailed Technologies, LLC. 2011. All rights reserved.
ZosSettings[T]: -> readConfiguration()
ZosSettings[T]: -> processConfigurationFile(/u/rdc2/.ssh/cozsftp_config)
ZosSettings[D]: no configuration file (/u/rdc2/.ssh/cozsftp_config) found.
ZosSettings[T]: <- processConfigurationFile()
ZosSettings[T]: -> processConfigurationFile(/etc/ssh/cozsftp_config)
ZosSettings[T]:    processConfigurationFile: Processing fixed: configuration file section
ZosSettings[T]:    processConfigurationFile: Processing default: configuration file section
ZosSettings[T]:    processConfigurationFile: Processing configuration file option: 'ssh-le-options=HEAP(8M,1M,,FREE),ENV
AR("_CEE_REALLOC_CONTROL=256K,25")'
ZosSettings[T]: <- processConfigurationFile()
ZosSettings[T]: <- readConfiguration()
ZosUtil[T]: -> zos_log_region_size()
ZosUtil[D]: region size requested = 0K, Actual below/above limit = 9192K / 1838080K
ZosUtil[T]: <- zos_log_region_size()
Connecting to zosha2...
cozsftp> lzopts mode=text,lrecl=32760,blksize=32760
 blksize=32760   lrecl=32760     mode=text
cozsftp> lzopts recfm=VS,linerule=ibmrdw,notrim
 linerule=ibmrdw     notrim              recfm=VS
cozsftp> zopts mode=text,lrecl=32760,blksize=32760,space=cyl.1.1
 blksize=32760   lrecl=32760     mode=text       space=cyl.1.1
cozsftp> zopts recfm=VS,linerule=ibmrdw,notrim
ZosDataset[T]: -> open("//DD:SYSUT1", 0x0002, 0x0000)
 linerule=ibmrdw     notrim              recfm=VS
cozsftp> put //DD:SYSUT1 //BCOH.LINKLIB.D12011.T112656
Uploading //DD:SYSUT1 to //BCOH.LINKLIB.D12011.T112656
DatasetHandler[T]: -> setDSN(DD:SYSUT1)
DatasetHandler[T]: <- setDSN(effectiveDSN=DD:SYSUT1)
RecordStreamer[T]: -> RecordStreamer()
RecordStreamer[F]: -> setTrim(true)
RecordStreamer[F]: <- setTrim()
RecordStreamer[T]: <- RecordStreamer()
RecordStreamer[F]: -> setSourceCodePage(IBM-1047)
RecordStreamer[F]: <- setSourceCodePage()
RecordStreamer[F]: -> setTargetCodePage(IBM-1047)
RecordStreamer[F]: <- setTargetCodePage()
RecordStreamer[F]: -> setTrim(false)
RecordStreamer[F]: <- setTrim()
RecordStreamer[F]: -> initialize()
RecordStreamer[F]: -> setPadChar(0x40)
RecordStreamer[F]: <- setPadChar()
RecordStreamer[D]: initialize(): sourceCodePage="IBM-1047"(0), targetCodePage="IBM-1047"(0), haveTranslateTable=no,
trim=no, srcSp=0x40, tgtCr=0xD, tgtNl=0x15, tgtLf=0x25, lineTerm=8
RecordStreamer[F]: <- initialize()
ZosDataset[I]: Opening dataset DD:SYSUT1 for read
DatasetHandler[T]: -> open()
DatasetHandler[T]: <- open()
ZosDataset[T]: <- open()
ZosDataset[T]: -> read(off=0 len=32768)
RecordStreamer[F]: -> streamRecord(recordCount=1 recLen=56 bufLen=32768)
RecordStreamer[F]: <- streamRecord(60)
RecordStreamer[F]: -> streamRecord(recordCount=2 recLen=276 bufLen=32708)
RecordStreamer[F]: <- streamRecord(280)
RecordStreamer[F]: -> streamRecord(recordCount=3 recLen=288 bufLen=32428)
RecordStreamer[F]: <- streamRecord(292)
RecordStreamer[F]: -> streamRecord(recordCount=4 recLen=1741 bufLen=32136)
RecordStreamer[F]: <- streamRecord(1745)
CEE3250C The system or user abend S002  R=00000004 was issued.
         From entry point ZosDataset::read(unsigned long long,char*,unsigned int) at compile unit offset +00000362 at
         entry offset +00000362 at address 10532CC2.
CoZBatch[I]: returning rc=exitcode=146

dovetail
Site Admin
Posts: 1848
Joined: Thu Jul 29, 2004 12:12 pm

Re: S002 RC=4 Abend Reading file

Post by dovetail » Thu Jan 12, 2012 1:49 pm

Very strange. I'm glad you found a workaround; AMATERSE seems like a good option anyway.

FWIW, you should be able to transfer the dataset with Co:Z SFTP using RECFM=U... but how did you override? specifying lzopts recfm=u is ignored (for reading datasets), but you should be able to override on the DD.

Something like:

Code: Select all

// EXEC COZBATCH
//SYSUT1 DD DSN=...,DISP=SHR,DCB=(RECFM=U,BLKSIZE=32760)
//STDIN DD *
..
cozsftp u@host <EOD
lzopts mode=binary,linerule=rdw
zopts mode=binary,linerule=rdw
zopts recfm=u,blksize=32760,space=cyl.3.1
put //SYSUT1 //hlq.target.dataset
//
but then you will have to either override or relabel the DCB on the target dataset when you unload with IEBCOPY.

BobC
Posts: 10
Joined: Fri Mar 04, 2011 9:57 am

Re: S002 RC=4 Abend Reading file

Post by BobC » Thu Jan 12, 2012 2:48 pm

but then you will have to either override or relabel the DCB on the target dataset when you unload with IEBCOPY
I overrode it on the DD when I sent it, and overiding on the target system DD didn't work, IEBCOPY had troubles with the first record.

Code: Select all

//STEP0010  EXEC PGM=IEBCOPY
//SYSPRINT   DD SYSOUT=*
//SYSUT1     DD DISP=OLD,
//             DSN=BCOH.LINKLIB.D12011.T112656,DCB=RECFM=VS
//SYSUT2     DD DISP=(,CATLG),
//             DSN=BCOH.LINKLIB,
//             VOL=SER=CICST2,UNIT=SYSDA,
//             DCB=(BLKSIZE=32760,DSORG=PO,RECFM=U),
//             SPACE=(CYL,(2,1,45))
//SYSUT3     DD UNIT=SYSDA,SPACE=(TRK,(60))
//SYSIN      DD DUMMY
The above JCL generated the following on the target system:

Code: Select all

                                        IEBCOPY MESSAGES AND CONTROL STATEMENTS
EB1135I IEBCOPY  FMID HDZ1A10  SERVICE LEVEL NONE     DATED 20090406 DFSMS 01.1
EB1035I RDC2CPY   STEP0010 08:35:33 THU 12 JAN 2012 PARM=''
TEP0010 COPY      INDD=SYSUT1,OUTDD=SYSUT2         GENERATED STATEMENT
EB1128I *** COPYR1 (1ST PDSU PHYSICAL RECORD)
 0094A0 FFF8  00000000 00000000 00480000 00440000  |                |
 0094B0 0008  00400000 003C0000 00CA6D0F 02007FF8  |          _   "8|
 0094C0 0018  0000C000 01007FF8 3030200F 00007FF8  |  {   "8      "8|
 0094D0 0028  0D0B000F E5A20000 22520000 00020070  |    Vs          |
 0094E0 0038  000B0000 00C00000 7F000000 80807FF8  |     {  "     "8|
 0094F0 0048  00008800 0011F000 00006A58 00000048  |  h   0   ¦     |
 009500 0058  02000000 000094E8 00006A88 0C007FB0  |      mY  ¦h  " |
 009510 0068  00006A80 00008800 00000000 00000000  |  ¦   h         |
 009520 0078  00000000 0D000000 0611F000 20007FF8  |          0   "8|
 009530 0088  00000000 00000000 00000000 00000000  ||
 009540 0098  00000000 00000000 00000000 00000000  ||
EB120I SYSUT1   VALIDATION ERROR
EB178I NOT AN IEBCOPY UNLOADED DATA SET - 1ST PHYSICAL RECORD NOT 64 BYTES LONG

Post Reply