Perhaps a bit of background is in order, I'm a mainframe COBOL programmer with some limited knowledge of assembler. I'm doing a performance assessment for a company which does not have an SMF extract / reporting process. So I'm attemping to modify an assembler program to process the SMF 101 record. I'm using as a starting point this assembler program https://ndtdb2.blogspot.com/2017/10/assembler-to-select-only-101-records.html?m=1&fbclid=IwAR0niwHPfYPfS31ilC9yDicMV97NLnKJV0_wYJg3rcF75Xwu8gt0E1hNbeQ
The question I have is that if the DB2 SMF records have been written in a compressed format, is there a way to decompress them in an assembler program by perhaps calling a service module to decompress the record ?
having to run a stand alone utility to read in a file of compressed SMF 101 records and write out the uncompressed records would double the amount of time / resources needed to do the analysis
any help would be greatly appreciated.
Chuck Haatvedt
how to decompress DB2 SMF records in assembler program
-
- Global moderator
- Posts: 2105
- Joined: Thu Jun 03, 2010 6:21 pm
- Skillset: Assembler, JCL, utilities
- Referer: zos.efglobe.com
Re: how to decompress DB2 SMF records in assembler program
Are you certain the records are "compressed?" Many fields in SMF data are either packed decimal dates (X'0121dddF' ddd is day of year) or binary time of day and not word aligned in 1/100th second interval.
-
- Posts: 27
- Joined: Sun Aug 16, 2009 11:07 pm
- Skillset: cobol, db2, application performance tuning
- Referer: SEARCH
- Location: St. Cloud, Minnesota
Re: how to decompress DB2 SMF records in assembler program
Thanks for the reply Steve, what I'm concerned about is the following from the SMF type 101 record. Note the the following reference
the following is a code snippet from the record layout for the type 101 records.
If SM101BUF > 0, that would seem to indicated that the record was compressed by CSRCESRV.
then the question is how would I go about uncompressing it ?
Chuck Haatvedt
THIS RECORD IS COMPRESSED BY CSRCESRV
the following is a code snippet from the record layout for the type 101 records.
Code: Select all
FLD: QWAS LEN(4) TYPE(BIN) DISP(0)
* SMF COMMON HEADER MAPPING MACRO FOR ACCOUNTING (SMF 101)
FLD: SM101LEN LEN(2) DISP(0) /*SM101 TOTAL LENGTH*/
FLD: SM101SGD LEN(2) DISP(2) /*ZZ BYTES*/
FLD: SM101FLG LEN(1) DISP(4) /*SYSTEM INDICATOR*/
FLD: SM101RTY LEN(1) TYPE(BU) DISP(5) /*RECORD TYPE X'65'*/
NOACC
FLD: SM101TME LEN(4) TYPE(B-SECS) DISP(6) DEC(2)
/*TIME SMF MOVED RECORD*/
FLD: SM101DTE TYPE(P-CYYDDD) DISP(10) /*DATE SMF MOVED RECORD*/
FLD: SM101SID LEN(4) DISP(14) /*SYSTEM ID (SID)*/
FLD: SM101SSI LEN(4) DISP(18) /*SUBSYSTEM ID*/
FLD: SM101STF LEN(2) DISP(22) /*SMF RECORD SUBTYPE*/
FLD: SM101SQ LEN(4) DISP(24)
COMP: SM101CMP = X'80' /*THIS RECORD IS COMPRESSED BY CSRCESRV*/
FLD: SM101BUF LEN(4) TYPE(BIN) DISP(24)
/*UNCOMPRESSED DATA LENGTH. THIS WILL BE*/
* 0 FOR UNCOMPRESSED RECORDS.
FLD: SM101END LEN(1) DISP(28) /*START OF THE SELF DEFINING SECTION*/
**********************************************************************
If SM101BUF > 0, that would seem to indicated that the record was compressed by CSRCESRV.
then the question is how would I go about uncompressing it ?
Chuck Haatvedt
-
- Posts: 474
- Joined: Thu Mar 10, 2016 5:03 pm
- Skillset: assembler rexx zOS ispf racf smf
- Referer: saw it in the experts foprum thought I could help here
Re: how to decompress DB2 SMF records in assembler program
I found the description of the CSRCESRV services in the z/OS MVS Programming: Assembler Services Reference ABE-HSP manual.
They look pretty straightforward to me. I don't have access to a system with DB2 running, so cannot test reading a type 101 - compressed or not.
They look pretty straightforward to me. I don't have access to a system with DB2 running, so cannot test reading a type 101 - compressed or not.
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Assembler program accessing IMS DB Database
by gschhatwal1176 » Sat Aug 08, 2020 12:34 pm » in Assembler - 5
- 6983
-
by NicC
View the latest post
Sun Aug 09, 2020 2:53 am
-
-
- 0
- 1540
-
by prisgs
View the latest post
Fri Nov 18, 2022 8:30 pm
-
-
Calling Java program on UNIX/USS from a COBOL CICS program?
by zbius » Tue Nov 05, 2024 2:37 pm » in IBM Cobol - 2
- 2547
-
by zbius
View the latest post
Wed Nov 06, 2024 6:02 pm
-
-
-
Insert records from File1 between records of File2
by Daouchiche » Wed Nov 10, 2021 6:37 am » in DFSORT/ICETOOL/ICEGENER - 6
- 2320
-
by sergeyken
View the latest post
Thu Nov 11, 2021 12:43 am
-
-
- 2
- 3128
-
by enrico-sorichetti
View the latest post
Mon Oct 30, 2023 6:25 pm