MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

macro for trimming a large dataset

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
infoman123
Beginner


Joined: 02 Nov 2004
Posts: 57
Topics: 20

PostPosted: Tue Jun 05, 2007 12:47 am    Post subject: macro for trimming a large dataset Reply with quote

Hi,

I have a dataset having large number of records. I need to trim this dataset by giving some ISREDIT commands in macro. I am sumitting this rexx as batch.

My main rexx is as follows
Code:

/* REXX */ address tso                                     
say 'hello....'                                           
address ISPEXEC                                           
"EDIT DATASET('GCST.DHBU.KOBK.CTOTAL.D310507') MACRO(ABC)"

and my macro ABC is as follows
Code:

x all '-' 21;flip;del all x               
x all p'@' 22;flip;del all x               
x all JOBNAME;x all ENDED.;;del all x     
"save"                                     
"END"                   

first i submitted as below
Code:

//BATISPF  EXEC PGM=IKJEFT01,PARM='%XYZ'         

then it executed the macro but with an error
     2 *-* "EDIT DATASET('GCST.DHBU.KOBK.CTOTAL.D310507') MACRO(cps2)" 
       +++ RC(-3) +++                                                   


then i open this XYZ in edit mode and gave SUBISPF in the command line and submitted a job. This job ended after sometime but didnt edited the dataset as expected.

Could anyone tell me the reason why it didnt executed the macro on this datset

Regards
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Tue Jun 05, 2007 1:22 am    Post subject: Reply with quote

  • you are not creating an ISPF environment.
  • you are not starting the program with ISPSTART to start ISPF.
  • your macro does not match any syntax of any programming language I know of.
  • your macro does not contain the basic elements of an ISPF edit macro (ISREDIT commands or subcommand environment, a Macro statement, etc)


Search Google for batchpdf to create the JCL. search for examples of both using TSO and ISPF in batch and of edit macros, and most importantly, read the relevant parts of th ISPF edit and edit macros manual to get the basics of how to write a macro.
Back to top
View user's profile Send private message Visit poster's website
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Tue Jun 05, 2007 5:39 am    Post subject: Reply with quote

Quote:
then i open this XYZ in edit mode and gave SUBISPF in the command line and submitted a job

You dont need to open the dataset manually in edit mode, since you already doing it with the EDIT service (this is an addition to semigeezer's comments, not a replacement).

O.
________
Aerostar


Last edited by ofer71 on Sat Feb 05, 2011 12:01 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
infoman123
Beginner


Joined: 02 Nov 2004
Posts: 57
Topics: 20

PostPosted: Tue Jun 05, 2007 9:22 pm    Post subject: Reply with quote

ofer71 wrote:
Quote:
then i open this XYZ in edit mode and gave SUBISPF in the command line and submitted a job

You dont need to open the dataset manually in edit mode, since you already doing it with the EDIT service (this is an addition to semigeezer's comments, not a replacement).

O.


then how can execute SUBISPF with out opening the file in edit mode..
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Wed Jun 06, 2007 12:32 am    Post subject: Reply with quote

I don't know what is SUBISPF, but I assume it simply submits a job. How about SUBMIT?

O.
________
CB400N


Last edited by ofer71 on Sat Feb 05, 2011 12:02 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
infoman123
Beginner


Joined: 02 Nov 2004
Posts: 57
Topics: 20

PostPosted: Wed Jun 06, 2007 12:40 am    Post subject: Reply with quote

as far i know, SUBISPF will submit the job by creating an ISPF environment
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Wed Jun 06, 2007 12:38 pm    Post subject: Reply with quote

Just Googled SUBISPF - no hits so either it is a local thing or it is so new it hasn't created any references.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group