Re: EDIT MACRO REQUEST

2024-01-09 Thread Paul Gilmartin
On Tue, 9 Jan 2024 22:41:50 +, Steely.Mark wrote:

>I would like to check each member of a PDS and if it is empty (0 Lines) - I 
>would like to add a line with the text of *NONE*.
>
What requirement does this satisfy?

After you do this, how will you know whether a member containing the "*NONE*"
line was initially empty or initially contained exactly that line?

Otherwise, I concur with Schmitt, Michael's suggestion.

-- 
gil

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


Re: EDIT MACRO REQUEST

2024-01-09 Thread Glenn Knickerbocker
On Tue, 9 Jan 2024 23:31:10 +, Schmitt, Michael  
wrote:
>3. LMMLIST LIST STATS(YES) to create a list of the members, with statistics
>   While LMMLIST rc = 0
>  If ZLCNORC = 0
> LMPUT to write your NONE line

Of course, that assumes that there *are* already statistics.  If the member has 
no statistics, you'll have to read it to find out if it has any records.

¬R

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


Re: EDIT MACRO REQUEST

2024-01-09 Thread Jon Perryman
On Tue, 9 Jan 2024 22:41:50 +, Steely.Mark  wrote:

>  ISPSTART CMD(%EDITREXX XX.TSS.CTM.DATA(PADM3) EMPTREXX)
>  ISPSTART CMD(%EDITREXX XX.TSS.CTM.DATA(PPCT3) EMPTREXX)

You don't want to start and stop ISPF for each member (ISPSTART). There are far 
better methods to process specific members or all members

>I would like to check each member of a PDS and if it is empty (0 Lines)
> I would like to add a line with the text of *NONE*.

I don't have access to a system and I'm doing this from memory, so this might 
not be quite right

ADDRESS ISREDIT
"MACRO (PARM1,PARM2,...)"
"(LINES) = LINENUM .ZLAST"
if lines = 0 then do
   "LINE_AFTER .ZFIRST = 'NONE'"
   "SAVE"
end
"END" 

>I would like to do this in batch using this format:

There are many ways to skin this cat. Your job would work but you might not 
have considered some alternatives. such as 

LMMLIST to get member list

Interactive ISPF 3.4 using E /(*) MACRO(EMPTREXX) 

Interactive ISPF 3.4 using M for member list. First use E line command 
MACRO(EMPTREXX). Subsequent members use = to repeat. If ISPF stats exist, then 
you can sort on lines and issue command for those with 0 lines.

Forget ISPF and use REXX. Certainly better than stopping and starting ISPF for 
each member. SYSOUTTRAP LISTDS MEMBERS to get the member list. For each desired 
member, ALLOC, EXECIO DISKR, EXECIO DISKW. FREE.

I'm sure there are more.  

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


Re: EDIT MACRO REQUEST

2024-01-09 Thread Schmitt, Michael
I wonder why I didn't get the original request.


I'm going to be THAT GUY who responds by not answering your question, and 
instead point out that there are way more efficient ways to do this than by 
starting up ISPF once per member. For example, you can start ISPF once with an 
exec that opens the library once, then iterates through the members. If you 
only want to process specific members, you can still have the list in a file 
that you read, then process each one. Starting up ISPF is slow, and so it 
opening and closing the PDS once per member.

For example:

1. LMINIT ENQ(SHRW) to generate a data id for the library
2. LMOPEN to open for output
3. LMMLIST LIST STATS(YES) to create a list of the members, with statistics
   While LMMLIST rc = 0
  If ZLCNORC = 0
 LMPUT to write your NONE line
  LMMLIST again
4. LMMLIST FREE
5. LMCLOSE
6. LMFREE

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Mark Zelden
Sent: Tuesday, January 9, 2024 4:54 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: EDIT MACRO REQUEST

On Tue, 9 Jan 2024 22:41:50 +, Steely.Mark  wrote:

>I would like to check each member of a PDS and if it is empty (0 Lines) - I 
>would like to add a line with the text of *NONE*.
>
>I would like to do this in batch using this format:
>
>//TSOBTCH1  EXEC PGM=IKJEFT01
>//SYSTSPRT  DD SYSOUT=*
>//SYSLIST   DD SYSOUT=*
>//ISPLOGDD DSN=,
>// DISP=(NEW,PASS),UNIT=SYSALLDA,SPACE=(CYL,(1,1,10)),
>// DCB=(RECFM=FB,BLKSIZE=3120,LRECL=80)
>//ISPPROF   DD DSN=,
>// DISP=(NEW,PASS),UNIT=SYSALLDA,SPACE=(CYL,(1,1,10)),
>// DCB=(RECFM=FB,BLKSIZE=3120,LRECL=80)
>//ISPMLIB   DD DSN=ISP.SISPMENU,DISP=SHR
>//ISPPLIB   DD DSN=ISP.SISPPENU,DISP=SHR
>//ISPSLIB   DD DSN=ISP.SISPSENU,DISP=SHR
>//ISPTLIB   DD DSN=ISP.SISPTENU,DISP=SHR
>//ISPTABL   DD DSN=XX.ISPF.ISPTLIB,DISP=SHR
>//SYSPROC   DD DSN=XX.CLIST,DISP=SHR
>//SYSTSIN   DD *
>  PROFILE PREFIX(XX)
>  ISPSTART CMD(%EDITREXX XX.TSS.CTM.DATA(PADM3) EMPTREXX)
>  ISPSTART CMD(%EDITREXX XX.TSS.CTM.DATA(PPCT3) EMPTREXX)
>  ISPSTART CMD(%EDITREXX XX.TSS.CTM.DATA(PCO13) EMPTREXX)
> Etc..
>
>EMPTREXX -  would be the ISREDIT Macro to perform the task.
>
>Any help would be appreciated.
>
>Thank You

Not sure what part you need help with.  Probably the EMPTREXX,  which I will 
leave to
someone else to help you with as I don't have time, but if you need help with
the "EDITREXX" part, see "EDMACALL" on my web site / CBT file 434.  URL
of my web site below.  The source code has a simple example of an
edit macro.


Regards,

Mark
--
Mark Zelden - Zelden Consulting Services - z/OS, OS/390 and MVS
ITIL v3 Foundation Certified
mailto:m...@mzelden.com
Mark's MVS Utilities: http://www.mzelden.com/mvsutil.html

--
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


Re: EDIT MACRO REQUEST

2024-01-09 Thread Steely.Mark
I have the EDITREXX part. That works. Only need help with the EMPTREXX issue.

Thanks

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Mark Zelden
Sent: Tuesday, January 09, 2024 4:54 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: EDIT MACRO REQUEST



CAUTION! EXTERNAL SENDER! STOP, ASSESS, AND VERIFY Do you know this person? 
Were you expecting this email? If not, report it using the Report Phishing 
Button!

On Tue, 9 Jan 2024 22:41:50 +, Steely.Mark  wrote:

>I would like to check each member of a PDS and if it is empty (0 Lines) - I 
>would like to add a line with the text of *NONE*.
>
>I would like to do this in batch using this format:
>
>//TSOBTCH1  EXEC PGM=IKJEFT01
>//SYSTSPRT  DD SYSOUT=*
>//SYSLIST   DD SYSOUT=*
>//ISPLOGDD DSN=,
>// DISP=(NEW,PASS),UNIT=SYSALLDA,SPACE=(CYL,(1,1,10)),
>// DCB=(RECFM=FB,BLKSIZE=3120,LRECL=80)
>//ISPPROF   DD DSN=,
>// DISP=(NEW,PASS),UNIT=SYSALLDA,SPACE=(CYL,(1,1,10)),
>// DCB=(RECFM=FB,BLKSIZE=3120,LRECL=80)
>//ISPMLIB   DD DSN=ISP.SISPMENU,DISP=SHR
>//ISPPLIB   DD DSN=ISP.SISPPENU,DISP=SHR
>//ISPSLIB   DD DSN=ISP.SISPSENU,DISP=SHR
>//ISPTLIB   DD DSN=ISP.SISPTENU,DISP=SHR
>//ISPTABL   DD DSN=XX.ISPF.ISPTLIB,DISP=SHR
>//SYSPROC   DD DSN=XX.CLIST,DISP=SHR
>//SYSTSIN   DD *
>  PROFILE PREFIX(XX)
>  ISPSTART CMD(%EDITREXX XX.TSS.CTM.DATA(PADM3) EMPTREXX)
>  ISPSTART CMD(%EDITREXX XX.TSS.CTM.DATA(PPCT3) EMPTREXX)
>  ISPSTART CMD(%EDITREXX XX.TSS.CTM.DATA(PCO13) EMPTREXX)
>Etc..
>
>EMPTREXX -  would be the ISREDIT Macro to perform the task.
>
>Any help would be appreciated.
>
>Thank You

Not sure what part you need help with.  Probably the EMPTREXX,  which I will 
leave to someone else to help you with as I don't have time, but if you need 
help with the "EDITREXX" part, see "EDMACALL" on my web site / CBT file 434.  
URL of my web site below.  The source code has a simple example of an edit 
macro.


Regards,

Mark
--
Mark Zelden - Zelden Consulting Services - z/OS, OS/390 and MVS ITIL v3 
Foundation Certified mailto:m...@mzelden.com Mark's MVS Utilities: 
http://www.mzelden.com/mvsutil.html

--
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


Re: EDIT MACRO REQUEST

2024-01-09 Thread Mark Zelden
On Tue, 9 Jan 2024 22:41:50 +, Steely.Mark  wrote:

>I would like to check each member of a PDS and if it is empty (0 Lines) - I 
>would like to add a line with the text of *NONE*.
>
>I would like to do this in batch using this format:
>
>//TSOBTCH1  EXEC PGM=IKJEFT01
>//SYSTSPRT  DD SYSOUT=*
>//SYSLIST   DD SYSOUT=*
>//ISPLOGDD DSN=,
>// DISP=(NEW,PASS),UNIT=SYSALLDA,SPACE=(CYL,(1,1,10)),
>// DCB=(RECFM=FB,BLKSIZE=3120,LRECL=80)
>//ISPPROF   DD DSN=,
>// DISP=(NEW,PASS),UNIT=SYSALLDA,SPACE=(CYL,(1,1,10)),
>// DCB=(RECFM=FB,BLKSIZE=3120,LRECL=80)
>//ISPMLIB   DD DSN=ISP.SISPMENU,DISP=SHR
>//ISPPLIB   DD DSN=ISP.SISPPENU,DISP=SHR
>//ISPSLIB   DD DSN=ISP.SISPSENU,DISP=SHR
>//ISPTLIB   DD DSN=ISP.SISPTENU,DISP=SHR
>//ISPTABL   DD DSN=XX.ISPF.ISPTLIB,DISP=SHR
>//SYSPROC   DD DSN=XX.CLIST,DISP=SHR
>//SYSTSIN   DD *
>  PROFILE PREFIX(XX)
>  ISPSTART CMD(%EDITREXX XX.TSS.CTM.DATA(PADM3) EMPTREXX)
>  ISPSTART CMD(%EDITREXX XX.TSS.CTM.DATA(PPCT3) EMPTREXX)
>  ISPSTART CMD(%EDITREXX XX.TSS.CTM.DATA(PCO13) EMPTREXX)
> Etc..
>
>EMPTREXX -  would be the ISREDIT Macro to perform the task.
>
>Any help would be appreciated.
>
>Thank You

Not sure what part you need help with.  Probably the EMPTREXX,  which I will 
leave to 
someone else to help you with as I don't have time, but if you need help with
the "EDITREXX" part, see "EDMACALL" on my web site / CBT file 434.  URL
of my web site below.  The source code has a simple example of an
edit macro.


Regards,

Mark
--
Mark Zelden - Zelden Consulting Services - z/OS, OS/390 and MVS
ITIL v3 Foundation Certified
mailto:m...@mzelden.com
Mark's MVS Utilities: http://www.mzelden.com/mvsutil.html

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


EDIT MACRO REQUEST

2024-01-09 Thread Steely.Mark
I would like to check each member of a PDS and if it is empty (0 Lines) - I 
would like to add a line with the text of *NONE*.

I would like to do this in batch using this format:

//TSOBTCH1  EXEC PGM=IKJEFT01
//SYSTSPRT  DD SYSOUT=*
//SYSLIST   DD SYSOUT=*
//ISPLOGDD DSN=,
// DISP=(NEW,PASS),UNIT=SYSALLDA,SPACE=(CYL,(1,1,10)),
// DCB=(RECFM=FB,BLKSIZE=3120,LRECL=80)
//ISPPROF   DD DSN=,
// DISP=(NEW,PASS),UNIT=SYSALLDA,SPACE=(CYL,(1,1,10)),
// DCB=(RECFM=FB,BLKSIZE=3120,LRECL=80)
//ISPMLIB   DD DSN=ISP.SISPMENU,DISP=SHR
//ISPPLIB   DD DSN=ISP.SISPPENU,DISP=SHR
//ISPSLIB   DD DSN=ISP.SISPSENU,DISP=SHR
//ISPTLIB   DD DSN=ISP.SISPTENU,DISP=SHR
//ISPTABL   DD DSN=XX.ISPF.ISPTLIB,DISP=SHR
//SYSPROC   DD DSN=XX.CLIST,DISP=SHR
//SYSTSIN   DD *
  PROFILE PREFIX(XX)
  ISPSTART CMD(%EDITREXX XX.TSS.CTM.DATA(PADM3) EMPTREXX)
  ISPSTART CMD(%EDITREXX XX.TSS.CTM.DATA(PPCT3) EMPTREXX)
  ISPSTART CMD(%EDITREXX XX.TSS.CTM.DATA(PCO13) EMPTREXX)
 Etc..

EMPTREXX -  would be the ISREDIT Macro to perform the task.

Any help would be appreciated.

Thank You



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