Page 1 of 1
How to update PDS member with ISPF statistic data
Posted:
Sat Apr 27, 2013 3:12 pm
by Zheng Dan
My program is written by pure C/C++ running on MVS. It can upload file to PDS as a member, but there is no ISPF statistic information, such as file size, creation time, modification time, userid. How could I implement those ISPF statistic information?
Re: How to update PDS member with ISPF statistic data
Posted:
Sat Apr 27, 2013 3:24 pm
by enrico-sorichetti
a generic question deserves a generic reply
if You are within an ISPF dialog
read the ISPF manuals on how create/update the ISPF statistics
else if You are using a PDS/PDSE aware program ( BLDL/FIND/STOW/and friends)
read the ISPF manuals for the layout and format of the ISPF statistics
read the MVS manuals about the layout of a pds/pdse directory structure
read the MVS manuals about the STOW macro used to update the PDS/PDSE directory.
else ( You are treating a PDS/PDSE member as a PS file )
You will not be able to update/create the ISPF statistic
the programming language used is IRRELEVANT
Re: How to update PDS member with ISPF statistic data
Posted:
Sat Apr 27, 2013 3:35 pm
by Zheng Dan
Enrico, thanks for your quick response.
I am not within ISPF dialog.
I am not very sure what is PDS aware program. Do you mean those BLDL/STOW macro ?
I think I should be treating a PDS member as a ps file.
The FTP has command "quote site ispfstats" to enable the uploaded member to display ISPF statistic. I just want to do similar thing. Couldn't I?
Re: How to update PDS member with ISPF statistic data
Posted:
Sat Apr 27, 2013 3:54 pm
by enrico-sorichetti
a PDS aware program knows that it is dealing with a PDS/PDSE
and uses the proper macros to process the dataset
FTP just does it,
uses the appropriate macros to find out the type of dataset and behave accordingly
C/C++ has some limited understanding of PDSs, but only for input
members are still considered as PS files
Your planned approach will not let You have what You want
if Your requirement is to process a PDS dataset
You will have to implement the proper infrastructure using assembler
and do not forget about proper enqueue process to protect the PDS integrity
Re: How to update PDS member with ISPF statistic data
Posted:
Sat Apr 27, 2013 4:19 pm
by steve-myers
Been there; done that.
Mr, Sorichetti is correct, you pretty much have to do this in Assembler, and you must know the detail format of the ISPF directory entry.
Re: How to update PDS member with ISPF statistic data
Posted:
Sat Apr 27, 2013 4:28 pm
by steve-myers
IHAPDS PDSBLDL=NO,DSECT=YES
ORG PDS2USRD RESET ORIGIN
* ISPF DIRECTORY USER DATA
SPFVER DS AL1 VERSION
SPFMOD DS AL1 LEVEL
DS AL1 NOT USED ?
SPFMODSS DS AL1 SS PACKED DECIMAL DIGITS FOR LAST ->
MODIFICATION TIME
SPFCREAT DS AL4 CREATION DATE (0YYYDDDF)
SPFMODD DS AL4 LAST MOD DATE (0YYYDDDF)
SPFMODT DS 2AL1 PACKED DECIMAL DIGITS FOR LAST ->
MODIFICATION TIME (HH:MM)
SPFSIZE DS AL2 RECORDS IN MEMBER
SPFINIT DS AL2 RECORDS IN MEMBER WHEN CREATED
SPFMODR DS AL2 MODIFIED RECORDS IN MEMBER
SPFUSER DS CL8 USERID (ONLY 7 BYES CAN BE USED)
DS CL2 UNKNOWN (BUT NORMALLY BLANK?)
SPFLEN EQU *-PDS2USRD BETTER BE 30 (X'1E')