IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

create rexx edit Macro that edits the current date


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mpestolas

New User


Joined: 09 Jan 2023
Posts: 1
Location: canada

PostPosted: Tue Feb 07, 2023 9:01 pm
Reply with quote

Hello,

hoping to get some help. I am a beginner on rexx. hope someone could help me. is there a way in rexx macro I can create a macro to edit the below jcl:


=COLS> ----+----1----+----2----+----3
****** *****************************
==MSG> NOTE: CAPS ON NUMBER ON
000100 *
000200 * CURRENT: YYYYMMDD
000300 *
006000 COPY ALL
006100 18,6,C,EQ,'014744'
006200 REPL
006300 10,8,C,'20230210'

insert a current date with format: YYYYMMDD on column #10

Appreciate your help.

Thank you,

Mike
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1329
Location: Bamberg, Germany

PostPosted: Tue Feb 07, 2023 9:22 pm
Reply with quote

What have you tried yourself so far? Also, please make use of the Code Button when presenting Code/Data.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2127
Location: USA

PostPosted: Tue Feb 07, 2023 9:43 pm
Reply with quote

mpestolas wrote:
is there a way in rexx macro I can create a macro to edit the below jcl:


Code:
=COLS> ----+----1----+----2----+----3
****** *****************************
==MSG> NOTE:   CAPS ON   NUMBER ON
000100 *
000200 * CURRENT:  YYYYMMDD
000300 *
006000  COPY ALL
006100  18,6,C,EQ,'014744'
006200  REPL
006300  10,8,C,'20230210'




1) Learn how to use the Code button when posting your samples

2) your sample has nothing to do with JCL. Not even a bit. That is just several text lines from an unknown source, and nothing else

3) the answer to your question is: Yes, there are several ways to do this in REXX
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 730
Location: Denmark

PostPosted: Tue Feb 07, 2023 11:56 pm
Reply with quote

Sure, but.. when you say insert, but do you mean replace? You mention column 10, I assume that this is just for line 006300 ? Must the change command take into account that the current value is a date, or is there a fixed value?

You can experiment with this, which is just one method:
Code:
 /*    ISPF edit macro       rexx */         
 Address Isredit "MACRO PROCESS (p)"         
 Address Isredit                             
 newdate=date('s')                           
 "change p'========' '"newdate"' 1 17  last"

Do chceck the manual for details.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts TSO ALLOC In REXX Needs Improvement JCL & VSAM 3
No new posts REXX/CMS How to place command console... CLIST & REXX 4
No new posts Date format correction using dfsort DFSORT/ICETOOL 3
No new posts Help needed in automation cics transa... CLIST & REXX 1
No new posts Reroute print output via REXX/SDSF TSO/ISPF 6
Search our Forums:

Back to Top