View previous topic :: View next topic |
Author |
Message |
infoman123 Beginner
Joined: 02 Nov 2004 Posts: 57 Topics: 20
|
Posted: Tue Jun 05, 2007 12:47 am Post subject: macro for trimming a large dataset |
|
|
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 |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue Jun 05, 2007 1:22 am Post subject: |
|
|
- 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 |
|
 |
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Tue Jun 05, 2007 5:39 am Post subject: |
|
|
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 |
|
 |
infoman123 Beginner
Joined: 02 Nov 2004 Posts: 57 Topics: 20
|
Posted: Tue Jun 05, 2007 9:22 pm Post subject: |
|
|
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 |
|
 |
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Wed Jun 06, 2007 12:32 am Post subject: |
|
|
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 |
|
 |
infoman123 Beginner
Joined: 02 Nov 2004 Posts: 57 Topics: 20
|
Posted: Wed Jun 06, 2007 12:40 am Post subject: |
|
|
as far i know, SUBISPF will submit the job by creating an ISPF environment |
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Wed Jun 06, 2007 12:38 pm Post subject: |
|
|
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 |
|
 |
|
|