Re: Edit commands without a macro?

2023-04-21 Thread Bob Bridges
I do this often enough that it's the first thing that occurred to me, too.
Dunno as I'd agree with "pointless", though.  Some of my REXXes check to see
whether the exec was called as a TSO command or Edit macro - with or without
the TSO prefix, in other words, from an ISPF command line - and adjust its
behavior accordingly.  If it has to use ISREDIT commands then, as Seymour
says, it can detect this and call itself as an edit macro.  But I'm pretty
sure I've had occasion to want the exec to behave differently depending on
the type of invocation; I can't remember off-hand the details, but it's
happened more than once.  Oh, I remember, maybe if it was called without the
TSO command prefix then it expects to look at the current Edit/View session
and interpret the current dataset, but if it was called as a TSO command
then it must open a particular (default) dataset and process that.

Ah, here's an example:  At one client users can issue "TSO WHOIS BRIDGES";
this opens a View session of a list of userIDs and executes an ONLY command,
which excludes all records but those that contain the string BRIDGES.  Or
they can say "TSO WHOIS" simply to View the dataset with no string search.
Or they can type "whois bridges" once they're in View and it'll do simply
the exclude-and-find part - and that they can do again and again.

Nothing very compelling, but it saves the users a little work.

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* The more sophisticated the technology, the more vulnerable it is to
primitive attack. People often overlook the obvious.  -Dr Who, 1978 */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of
Seymour J Metz
Sent: Friday, April 21, 2023 11:19

It's simple, but, IMHO, pointless. At the beginning of the macro, you test
the current environment. If it's not ISREDIT, then call EDIT with an initial
macro.


From: Billy Ashton 
Sent: Friday, April 21, 2023 10:57 AM

Is it possible to use a Rexx program to edit a file (maybe a PDS member,
maybe a flat file, shouldn't care) and to issue ISREDIT commands there, but
not by using a separate macro? IOW, I want to have a single program that I
can pass a file as a parm, and then this Rexx program edits the file, does
some commands to find things and maybe change things, saves the file,
displays some other stuff, and then ends.

Is there a way to do this Edit stuff without a separate macro?

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


Re: Edit commands without a macro?

2023-04-21 Thread Sri h Kolusu
>>1) You could use IPOUPDTE also.

David,

AFAIK , IPOUPDTE can only work on PDS but does NOT work with sequential 
datasets.  OP hasn't specified if the input is a pds or sequential datasets. 
File-Manager handles both PDS and sequential files.

>>2) Does File manager do "intelligent changes" like ISPF Edit? (If Source 
>>String and Target String are different lengths, does the "line" beyond the 
>>change get shifted, or, if there multiple blanks, not necessarily)

The only restriction for file manager is

Data sets containing variable length records :  If a CHANGE command would 
result in an increase in the length of a variable length record, the change is 
not processed.

Here is the link to the documentation.
https://www.ibm.com/docs/en/file-manager-for-zos/14.1?topic=functions-fch-findchange

Thanks,
Kolusu


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


Re: Edit commands without a macro?

2023-04-21 Thread Seymour J Metz
Or use TSO EDIT.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Sri 
h Kolusu [skol...@us.ibm.com]
Sent: Friday, April 21, 2023 12:23 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Edit commands without a macro?

>> Is there a way to do this Edit stuff without a separate macro?

Billy,

If you have access to FILE Manger tool then you can pass the parms as variables 
to job and it will update the file. Here is a simple example

// EXPORT SYMLIST=*
// SET SRCSTRNG='BILLY '
// SET TGTSTRNG='ASHTON'
/*
//STEP0100 EXEC PGM=FILEMGR
//SYSPRINT DD SYSOUT=*
//DDIN DD DISP=SHR,DSN=Your.input.seq.file.or.pds
//SYSINDD *,SYMBOLS=JCLONLY
$$FILEM FCH
C '' ''
/*

Thanks,
Kolusu


--
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 commands without a macro?

2023-04-21 Thread David Spiegel

Hi Kolusu,
1) You could use IPOUPDTE also.
2) Does File manager do "intelligent changes" like ISPF Edit? (If Source 
String and Target String are different lengths, does the "line" beyond 
the change get shifted, or, if there multiple blanks, not necessarily)


Regards,
David

On 2023-04-21 12:23, Sri h Kolusu wrote:

Is there a way to do this Edit stuff without a separate macro?

Billy,

If you have access to FILE Manger tool then you can pass the parms as variables 
to job and it will update the file. Here is a simple example

// EXPORT SYMLIST=*
// SET SRCSTRNG='BILLY '
// SET TGTSTRNG='ASHTON'
/*
//STEP0100 EXEC PGM=FILEMGR
//SYSPRINT DD SYSOUT=*
//DDIN DD DISP=SHR,DSN=Your.input.seq.file.or.pds
//SYSINDD *,SYMBOLS=JCLONLY
$$FILEM FCH
C '' ''
/*

Thanks,
Kolusu


--
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 commands without a macro?

2023-04-21 Thread Sri h Kolusu
>> Is there a way to do this Edit stuff without a separate macro?

Billy,

If you have access to FILE Manger tool then you can pass the parms as variables 
to job and it will update the file. Here is a simple example

// EXPORT SYMLIST=*
// SET SRCSTRNG='BILLY '
// SET TGTSTRNG='ASHTON'
/*
//STEP0100 EXEC PGM=FILEMGR
//SYSPRINT DD SYSOUT=*
//DDIN DD DISP=SHR,DSN=Your.input.seq.file.or.pds
//SYSINDD *,SYMBOLS=JCLONLY
$$FILEM FCH
C '' ''
/*

Thanks,
Kolusu


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


Re: Edit commands without a macro?

2023-04-21 Thread Paul Gilmartin
On Fri, 21 Apr 2023 15:18:32 +, Seymour J Metz wrote:

>It's simple, but, IMHO, pointless. At the beginning of the macro, you test the 
>current environment. If it's not ISREDIT, then call EDIT with an initial macro.
>
The initial command environment will be TSO in either case.  You may be
thinking of XEDIT which isn't as poorly designed as ISPF.

I have used ADDRESS ISREDIT MACRO ... and tested the return code.
My EXEC can name itself as the initial macro.

-- 
gil

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


Re: Edit commands without a macro?

2023-04-21 Thread Radoslaw Skorupka

W dniu 21.04.2023 o 16:57, Billy Ashton pisze:
Hey Rexxers, I suspect that this is simple, but my old, feeble brain 
can't find the answer.


Is it possible to use a Rexx program to edit a file (maybe a PDS 
member, maybe a flat file, shouldn't care) and to issue ISREDIT 
commands there, but not by using a separate macro? IOW, I want to have 
a single program that I can pass a file as a parm, and then this Rexx 
program edits the file, does some commands to find things and maybe 
change things, saves the file, displays some other stuff, and then ends.


Is there a way to do this Edit stuff without a separate macro?


As far as I understand you want to edit a member (or PS) in "batch 
mode", that means without invoking ISPF Edit.

Just like that: TSO MYCHANGE PARM1.
Yes, it is possible. Does it use ISREDIT or anything else? Who cares?

--
Radoslaw Skorupka
Lodz, Poland

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


Re: Edit commands without a macro?

2023-04-21 Thread Seymour J Metz
It's simple, but, IMHO, pointless. At the beginning of the macro, you test the 
current environment. If it's not ISREDIT, then call EDIT with an initial macro.


From: IBM Mainframe Discussion List  on behalf of 
Billy Ashton 
Sent: Friday, April 21, 2023 10:57 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Edit commands without a macro?

Hey Rexxers, I suspect that this is simple, but my old, feeble brain
can't find the answer.

Is it possible to use a Rexx program to edit a file (maybe a PDS member,
maybe a flat file, shouldn't care) and to issue ISREDIT commands there,
but not by using a separate macro? IOW, I want to have a single program
that I can pass a file as a parm, and then this Rexx program edits the
file, does some commands to find things and maybe change things, saves
the file, displays some other stuff, and then ends.

Is there a way to do this Edit stuff without a separate macro?

Thank you and best regards,
Billy Ashton

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