Re: Read SMF using COBOL

2017-03-22 Thread Bill Woodger
Ah, the diagnostic is only for OUTPUT/EXTEND for an F-type with RECORD CONTAINS 
0.

Since it doesn't produce a diagnostic message in your case, I think you are OK 
going forward, but I'd not code it like that.

Also, your FD:

FD  SMF-RECORDS-IN
RECORDING MODE S
LABEL RECORDS ARE STANDARD
BLOCK CONTAINS 32760 CHARACTERS
RECORD CONTAINS 14 TO 32760 CHARACTERS
DATA RECORDS ARE SMF-MIN-REC
 SMF-TYPE14-REC
 SMF-TYPE17-REC
 SMF-TYPE65-REC
 SMF-MAX-REC.

Can be simplified:

FD  SMF-RECORDS-IN
RECORDING MODE S
RECORD CONTAINS 0.

BLOCK CONTAINS is irrelevant for an input file (it is already in blocks, you 
can't change it, or get it changed).

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Read SMF using COBOL

2017-03-22 Thread Bill Woodger
The Language Reference says:

"The RECORD CONTAINS 0 CHARACTERS clause can be specified for
input QSAM files containing fixed-length records; the record size is
determined at run time from the DD statement parameters or the data set
label. If, at run time, the actual record is larger than the 01 record
description, then only the 01 record length is available. If the actual record
is shorter, then only the actual record length can be referred to. Otherwise,
uninitialized data or an addressing exception can be produced."

However, no diagnostic for non-F :-)

If you use SMF-MAX-REC when you know that it is a maximum-length record, expect 
a S0C4. I guess you won't use it.

Better would be RECORD IS VARYING from minimum to maximum (which can be 32756 
if that is your actual maximum of data possible).

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Read SMF using COBOL

2017-03-22 Thread Bill Woodger
BLOCK CONTAINS 0 makes sense, if BLOCK CONTAINS is specified in a COBOL 
program, it overrides everything else up the line. But, won't affect your 
problem.

RECORD CONTAINS 0. That's for fixed-length records, where the actual length 
will be acquired at runtime.

For a variable-length record file, you'll get a diagnostic message. I thought 
it was even an RC=8.

It does, however, "work". Until IBM make a change to the compiler. Which means, 
since they've already changed it, perhaps doesn't do the same thing in V5+.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Read SMF using COBOL

2017-03-22 Thread Steely.Mark
The solution was to change the file system to :

 FD  SMF-RECORDS-IN  
RECORDING MODE S
LABEL RECORDS ARE STANDARD  
BLOCK CONTAINS 0 CHARACTERS   Change this to 0 char  
RECORD CONTAINS 0 CHARACTERSChange this to 0 char
 DATA RECORDS ARE SMF-MIN-REC
 SMF-TYPE14-REC 
 SMF-TYPE17-REC 
 SMF-TYPE65-REC 
 SMF-MAX-REC.


Thanks for all the suggestions. 


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Read SMF using COBOL

2017-03-22 Thread Bill Woodger
And no, I don't know why the discrepancy is not four. Perhaps there is a 
problem when you specify variable-length data in the FD that is longer than the 
maximum possible value.

You should get the file open by reducing your 32760 to 32754 in the FILLER.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Read SMF using COBOL

2017-03-22 Thread Bill Woodger
You have specified 32760 bytes of data. Remember that the LRECL does not only 
include data. If you have 32760 of data, your LRECL would be larger than 32760. 
If your LRECL is 32760, your data has to be shorter.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Read SMF using COBOL

2017-03-22 Thread John McKown
On Wed, Mar 22, 2017 at 12:40 PM, Steely.Mark 
wrote:

> I am trying to read SMF data using COBOL for z/OS  4.2.0. This setup use
> to work but that was in a past life.
>
> This input is Record Format. . . : VBS, Record Length. . . : 32760 & Block
> Size   . . . : 32760. Program IFASMFDP
>
> Cobol File Section:
>
> FD  SMF-RECORDS-IN
> RECORDING MODE S
> LABEL RECORDS ARE STANDARD
> BLOCK CONTAINS 32760 CHARACTERS
> RECORD CONTAINS 14 TO 32760 CHARACTERS
> DATA RECORDS ARE SMF-MIN-REC
>  SMF-TYPE14-REC
>  SMF-TYPE17-REC
>  SMF-TYPE65-REC
>  SMF-MAX-REC.
> SKIP1
> 01  SMF-MIN-REC.
> 12  FILLER  PIC X.
> 12  SMF-RECORD-TYPE PIC X.
> 12  FILLER  PIC X(12).
> SKIP3
> 01  SMF-TYPE14-REC.
> 12  FILLER  PIC X(284).
> SKIP3
> 01  SMF-TYPE17-REC.
> 12  FILLER  PIC X(232).
> SKIP3
> 01  SMF-TYPE65-REC.
> 12  FILLER  PIC X(208).
> SKIP3
> 01  SMF-MAX-REC.
> 12  FILLER  PIC X(32760).
> EJECT
>
> Receive error:
> IGZ0201W A file attribute mismatch was detected. File SMF-RECORDS-IN in
> program  SMFXTRCT had a record length of 32771 and the file specified
> in the ASSIGN  clause had a record length of 32760.
> IGZ0035S There was an unsuccessful OPEN or CLOSE of file SMFIN in program
> SMFXTRCT at  relative location X'0416'. Neither FILE STATUS nor an ERROR
> declarative were   specified. The status code was 39. From compile unit
> SMFXTRCT at entry point  SMFXTRCT at compile unit offset +0416 at
> address 7786.
> <> LEAID ENTERED (LEVEL 11/20/2015 AT 08.13)
> <> LEAID PROCESSING COMPLETE. RC=0
>
> I tried changing to RECORD CONTAINS  to 32771 but receive error message:
>  IGYGR1224-E  SMF-RECORDS-IN" was greater than the maximum allowable size
> 32767
>
> Is there a way to do this with COBOL.
>

​This is what I found:
https://www.ibm.com/support/knowledgecenter/en/SS6SG3_4.2.0/com.ibm.entcobol.doc_4.2/PGandLR/tasks/tpqsm14.htm

Basically for LBI (tape only), you say:

BLOCK CONTAINS 0 CHARACTERS​



>
> Thanks
>


-- 
"Irrigation of the land with seawater desalinated by fusion power is
ancient. It's called 'rain'." -- Michael McClary, in alt.fusion

Maranatha! <><
John McKown

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Read SMF using COBOL

2017-03-22 Thread Steve Beaver
Add this to your DD Statement

dcb=(eropt=acc)

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Steely.Mark
Sent: Wednesday, March 22, 2017 12:41 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Read SMF using COBOL

I am trying to read SMF data using COBOL for z/OS  4.2.0. This setup use to
work but that was in a past life.

This input is Record Format. . . : VBS, Record Length. . . : 32760 & Block
Size   . . . : 32760. Program IFASMFDP

Cobol File Section:

FD  SMF-RECORDS-IN
RECORDING MODE S
LABEL RECORDS ARE STANDARD
BLOCK CONTAINS 32760 CHARACTERS
RECORD CONTAINS 14 TO 32760 CHARACTERS
DATA RECORDS ARE SMF-MIN-REC
 SMF-TYPE14-REC
 SMF-TYPE17-REC
 SMF-TYPE65-REC
 SMF-MAX-REC.
SKIP1
01  SMF-MIN-REC.
12  FILLER  PIC X.
12  SMF-RECORD-TYPE PIC X.
12  FILLER  PIC X(12).
SKIP3
01  SMF-TYPE14-REC.
12  FILLER  PIC X(284).
SKIP3
01  SMF-TYPE17-REC.
12  FILLER  PIC X(232).
SKIP3
01  SMF-TYPE65-REC.
12  FILLER  PIC X(208).
SKIP3
01  SMF-MAX-REC.
12  FILLER  PIC X(32760).
EJECT

Receive error:
IGZ0201W A file attribute mismatch was detected. File SMF-RECORDS-IN in
program  SMFXTRCT had a record length of 32771 and the file specified
in the ASSIGN  clause had a record length of 32760.
IGZ0035S There was an unsuccessful OPEN or CLOSE of file SMFIN in program
SMFXTRCT at  relative location X'0416'. Neither FILE STATUS nor an ERROR
declarative were   specified. The status code was 39. From compile unit
SMFXTRCT at entry point  SMFXTRCT at compile unit offset +0416 at
address 7786.
<> LEAID ENTERED (LEVEL 11/20/2015 AT 08.13) <> LEAID PROCESSING COMPLETE.
RC=0

I tried changing to RECORD CONTAINS  to 32771 but receive error message:
IGYGR1224-E  SMF-RECORDS-IN" was greater than the maximum allowable size
32767

Is there a way to do this with COBOL.

Thanks

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email
to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Read SMF using COBOL

2017-03-22 Thread Steely.Mark
I am trying to read SMF data using COBOL for z/OS  4.2.0. This setup use to 
work but that was in a past life.

This input is Record Format. . . : VBS, Record Length. . . : 32760 & Block Size 
  . . . : 32760. Program IFASMFDP

Cobol File Section:

FD  SMF-RECORDS-IN
RECORDING MODE S
LABEL RECORDS ARE STANDARD
BLOCK CONTAINS 32760 CHARACTERS
RECORD CONTAINS 14 TO 32760 CHARACTERS
DATA RECORDS ARE SMF-MIN-REC
 SMF-TYPE14-REC
 SMF-TYPE17-REC
 SMF-TYPE65-REC
 SMF-MAX-REC.
SKIP1
01  SMF-MIN-REC.
12  FILLER  PIC X.
12  SMF-RECORD-TYPE PIC X.
12  FILLER  PIC X(12).
SKIP3
01  SMF-TYPE14-REC.
12  FILLER  PIC X(284).
SKIP3
01  SMF-TYPE17-REC.
12  FILLER  PIC X(232).
SKIP3
01  SMF-TYPE65-REC.
12  FILLER  PIC X(208).
SKIP3
01  SMF-MAX-REC.
12  FILLER  PIC X(32760).
EJECT

Receive error:
IGZ0201W A file attribute mismatch was detected. File SMF-RECORDS-IN in program 
 SMFXTRCT had a record length of 32771 and the file specified   
   in the ASSIGN  clause had a record length of 32760.
IGZ0035S There was an unsuccessful OPEN or CLOSE of file SMFIN in program 
SMFXTRCT at  relative location X'0416'. Neither FILE STATUS nor an ERROR 
declarative were   specified. The status code was 39. From compile unit 
SMFXTRCT at entry point  SMFXTRCT at compile unit offset +0416 at address 
7786.
<> LEAID ENTERED (LEVEL 11/20/2015 AT 08.13)
<> LEAID PROCESSING COMPLETE. RC=0

I tried changing to RECORD CONTAINS  to 32771 but receive error message:   
IGYGR1224-E  SMF-RECORDS-IN" was greater than the maximum allowable size 32767

Is there a way to do this with COBOL.

Thanks

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN