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

Error in ispf edit session command using macro


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
smilingashutosh

New User


Joined: 08 Jun 2006
Posts: 22

PostPosted: Sun Oct 15, 2006 2:33 pm
Reply with quote

Hi all ,

I am using below mentioned code but when i issued command

Backup pdsname
i m getting this error, any body help me out

File Edit Edit_Settings Menu Utilities Compilers Test Help
-------------------------------------------------------------------------------
EDIT NBK7VYS.NETA.D15OCT06.T020104 T macro error
Command ===> Scroll ===> PAGE
****** ***************************** Top of Data ******************************
000100 /* REXX */
000200 ADDRESS ISREDIT "MACRO (name)"
000300 ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
000400 ADDRESS ISREDIT "(zmem) = member"
000500 z_parm = strip(name)
000600 say z_parm
000700 zuser = userid()
000800 ZDATE = date()
000900 ZTIME = TIME()
001000 PARSE VAR ZDATE dd " " mon " " gggg
001100 parse var gggg d "0" yy
001200 PARSE VAR ZTIME hr ":" min ":" sec
001300 "ALLOC DA('"ZUSER"."z_parm".D"dd""mon""yy".T"hr""min""sec"')
001400 space(50,20) NEW CATALOG REUSE RECFM(F,B) LRECL (80) BLKSIZE(800)"
001500 X = SYSDSN("'"ZUSER"."z_parm".D"DD""MON""YY".T"HR""MIN""SEC"'")
001600 IF X = 'OK' THEN
001700 DO
F1=Help F2=Split F3=Exit F5=Rfind F6=Rchange F7=Up
F8=Down F9=Swap F10=Left F11=Right F12=Cancel



The Rexx Code is
/* REXX */
ADDRESS ISREDIT "MACRO (name)"
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS ISREDIT "(zmem) = member"
z_parm = strip(name)
say z_parm
zuser = userid()
ZDATE = date()
ZTIME = TIME()
PARSE VAR ZDATE dd " " mon " " gggg
parse var gggg d "0" yy
PARSE VAR ZTIME hr ":" min ":" sec
"ALLOC DA('"ZUSER"."z_parm".D"dd""mon""yy".T"hr""min""sec"')
space(50,20) NEW CATALOG REUSE RECFM(F,B) LRECL (80) BLKSIZE(800)"
X = SYSDSN("'"ZUSER"."z_parm".D"DD""MON""YY".T"HR""MIN""SEC"'")
IF X = 'OK' THEN
DO
ADDRESS ISREDIT "CUT .ZFIRST .ZLAST"
ADDRESS ISREDIT "END"
ADDRESS ISREDIT "END"
address ispexec
"edit dataset('"ZUSER"."z_parm".D"DD""MON""YY".T"HR""MIN""SEC"')
macro(t)"
ADDRESS ISREDIT "END"
ZEDLMSG = " YOU HAVE SUCCESSFULLY TAKEN THE BACKUP "
address ispexec " setmsg msg(isrz001) "
end
EXIT
END


The Code for Macro(t) is

/*REXX */
ADDRESS ISREDIT "MACRO"
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS ISREDIT "PASTE AFTER .ZLAST"
ADDRESS ISREDIT "SAVE"
ADDRESS ISREDIT "END"
ADDRESS ISREDIT "END"
EXIT 0
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Oct 15, 2006 3:05 pm
Reply with quote

Few things:

First, never start your variables name with "z" when ISPF is involved. This is a very bad practice.

I can't see the continuation comma for the ALLOC command and the EDIT service.

Have you tried to run it with "TRACE I" ?

O.
Back to top
View user's profile Send private message
smilingashutosh

New User


Joined: 08 Jun 2006
Posts: 22

PostPosted: Sun Oct 15, 2006 4:36 pm
Reply with quote

Thanks 4 quick reply offer, i did what u said but the error is still the same,

what is Trace i ? Is it debugging command or what? actually my problem is when i issue
backup memname
it goes to the created pds and gives error in macro but the cut portion is getting pasted and to return back i need to press F3 button.

can u help me in this

Thanks in advance
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Oct 15, 2006 5:07 pm
Reply with quote

Indeed, TRACE is a debugging command. You might want to read about it in the fine manual.

O.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
Search our Forums:

Back to Top