Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Error in ispf edit session command using macro

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Error in ispf edit session command using macro
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: 2360
Location: Israel

PostPosted: Sun Oct 15, 2006 3:05 pm    Post subject:
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    Post subject: Re: Error in ispf edit session command using macro
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: 2360
Location: Israel

PostPosted: Sun Oct 15, 2006 5:07 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
This topic is locked: you cannot edit posts or make replies. session stuck in TPX with status ACL amitc23 CA Products 1 Tue Dec 13, 2016 12:53 pm
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us