Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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
This topic is locked: you cannot edit posts or make replies. ISREDIT Macro is not returning back t... nico_neoz CLIST & REXX 21 Sat Nov 18, 2017 7:40 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Having a problem FTP'ng to the MF pahiker All Other Mainframe Topics 2 Fri Nov 10, 2017 8:20 pm
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us