How to update PDS member with ISPF statistic data



Help for C/C++ for MVS, OS/390 C/C++, z/OS C/C++ and C/C++ Productivity Tools for OS/390

How to update PDS member with ISPF statistic data

Postby Zheng Dan » Sat Apr 27, 2013 3:12 pm

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?
Zheng Dan
 
Posts: 2
Joined: Sat Apr 27, 2013 2:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to update PDS member with ISPF statistic data

Postby enrico-sorichetti » Sat Apr 27, 2013 3:24 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: How to update PDS member with ISPF statistic data

Postby Zheng Dan » Sat Apr 27, 2013 3:35 pm

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?
Zheng Dan
 
Posts: 2
Joined: Sat Apr 27, 2013 2:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to update PDS member with ISPF statistic data

Postby enrico-sorichetti » Sat Apr 27, 2013 3:54 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: How to update PDS member with ISPF statistic data

Postby steve-myers » Sat Apr 27, 2013 4:19 pm

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.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: How to update PDS member with ISPF statistic data

Postby steve-myers » Sat Apr 27, 2013 4:28 pm

         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')
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times


Return to C, C++

 


  • Related topics
    Replies
    Views
    Last post