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
 

 

problem in writing ISPF 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: Fri Sep 29, 2006 3:01 pm    Post subject: problem in writing ISPF macro
Reply with quote

Hi all,

i m trying a rexx program which will cut the data form pds1(mem1) and then paste it to another pds2(mem2). mem2 is new member and pds2 is already created.

i m using this, anybody tell what wrong with this?
Code:

/* REXX */                                       
ADDRESS ISREDIT "MACRO"                         
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"         
X = SYSDSN("'NBK7VYS.MYBACK.FILE'")             
IF X = 'OK' THEN                                 
DO                                               
  ADDRESS ISREDIT "CUT .ZF .ZL"                   
  ADDRESS ISREDIT "EDIT 'NBK7VYS.MYBACK1.FILE(DD)' "                       
  ADDRESS ISREDIT "PASTE AFTER .ZF"   
  ADDRESS ISREDIT "SAVE"               
  EXIT                                             
END
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Sep 29, 2006 6:00 pm    Post subject: Re: problem in writing ISPF macro
Reply with quote

1. ISREDIT "CUT .ZF .ZL".

According to the manual, that should be ISREDIT "CUT .ZFIRST .ZLAST". Of course, you could just use CUT ALL.

2. ISREDIT "EDIT 'NBK7VYS.MYBACK1.FILE(DD)' ".

This is the wrong format of the EDIT command. The format is EDIT member. It cannot be another dataset. I think you want to instead launch an ISPEXEC EDIT ... session for the other dataset.
Back to top
View user's profile Send private message
smilingashutosh

New User


Joined: 08 Jun 2006
Posts: 22

PostPosted: Fri Sep 29, 2006 6:19 pm    Post subject: Re: problem in writing ISPF macro
Reply with quote

yes i want to do the same ..i m new to rexx..can you suggest the command syntax to do the same
Back to top
View user's profile Send private message
TizMe

New User


Joined: 05 Jan 2006
Posts: 72

PostPosted: Mon Oct 02, 2006 8:22 am    Post subject:
Reply with quote

Code:
 
Address ISPEXEC                                           
'LMINIT DATAID(INDD) DATASET('''dsin''') ENQ(SHR)'         
'LMINIT DATAID(OUTDD) DATASET('''dsout''') ENQ(SHRW)'     
'LMCOPY FROMID('INDD') TODATAID('OUTDD') FROMMEM('mbrin')   
 TOMEM('mbrout') REPLACE'                                     
 if rc?=0 then do                                         
   say 'failed to copy'                                   
   leave                                                   
 end                                                       
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 Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts ISPF - How to come out of ISPF Panel parasmalik20 TSO/ISPF 5 Tue Feb 21, 2017 7:44 pm


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