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

problem in writing ISPF 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: Fri Sep 29, 2006 3:01 pm
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

Global Moderator


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

PostPosted: Fri Sep 29, 2006 6:00 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Two input files & writing counter... DFSORT/ICETOOL 12
No new posts PRINTOUT macro PL/I & Assembler 0
Search our Forums:

Back to Top