View previous topic :: View next topic
|
Author |
Message |
Sanath sekhar Reddy N
New User
Joined: 31 Oct 2012 Posts: 30 Location: INDIA
|
|
|
|
Hi
I have coded macro with few tso commands like below in a separate member of pds
x 'cobol' all
del x all
And iam trying to execute this calling from another rexx program using jcl.
But the above coded macro is not working can any one please help.?
Regards
Sanath |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Hi,
Could you copy & paste the macro?
and when you say not working it doesn't help us much you got to give the details of not working like errors that you have got or any info which would help us to debug your code |
|
Back to top |
|
|
Sanath sekhar Reddy N
New User
Joined: 31 Oct 2012 Posts: 30 Location: INDIA
|
|
|
|
Example -
/* REXX */
ADDRESS ISPEXEC "EDIT DATASET('xk.prog.mclist') MACRO(test1)"
test1:
ADDRESS ISREDIT
x 'COBOL' ALL
DEL X ALL
WHERE AS xk.prog.mclist will contain some comments in the cobol code ,where i want to delete all the comented lines having "cobol".
Please help.The macro test1 is not working on the xk.prog.mclist. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
FIR - What you have tried to code will delete all lines has 'cobol' irrespective of comment
At this moment not sure if your input file has only comments |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
from another rexx program using jcl. |
Show us the JCL.
You have to use ISPSTART CMD(%myrexx)
and you have to have DD statements for all of the datasets required by ISPF.
And your editor macro needs to have an END.
You need to provide the symptoms of the 'it does not work' result. |
|
Back to top |
|
|
Sanath sekhar Reddy N
New User
Joined: 31 Oct 2012 Posts: 30 Location: INDIA
|
|
|
|
Code: |
//*******************************************************************
//*------------------------------------------------------------------
//STEP0010 EXEC PGM=IKJEFT01,DYNAMNBR=20,COND=(0,NE)
//ISPPLIB DD DSN=ISP.SISPPENU,DISP=SHR
//ISPSLIB DD DSN=ISP.SISPSLIB,DISP=SHR
// DD DSN=ISP.SISPSENU,DISP=SHR
//ISPMLIB DD DSN=ISP.SISPMENU,DISP=SHR
//ISPPROF DD DSN=UP8752.ISPF.PROFILE,DISP=SHR
//ISPTLIB DD DSN=ISP.SISPTENU,DISP=SHR
//ISPLOG DD SYSOUT=*,
// DCB=(LRECL=120,BLKSIZE=2400,DSORG=PS,RECFM=FB)
//ISPLIST DD SYSOUT=*,
// DCB=(LRECL=121,BLKSIZE=1210,RECFM=FBA)
//SYSEXEC DD DSN=XX.JCLS,DISP=SHR
// DD DSN=ISP.SISPEXEC,DISP=SHR
//SYSPROC DD DSN=XX.JCLS,DISP=SHR
// DD DSN=ISP.SISPCLIB,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
//* PROFILE PREFIX(UP8752)
ISPSTART CMD(%MACREXEC XK.SAMP.COB MAC2)
/* |
Where as MACREXEC is having below REXX code
Quote: |
/* REXX */
I=1
TRACE I
PARSE ARG XK.SAMP.COB MAC2
INP = "'"||XK.SAMP.COB||"'"
X=OUTTRAP(A.)
"LISTDS "INP" MEMBERS"
X = OUTTRAP("OFF")
DO I = 7 TO A.0
MEM = "'"||XK.SAMP.COB|| '('||STRIP(A.I)||')"'"
ADDRESS ISPEXEC
"EDIT DATASET("MEM") MACRO("MAC2")
END
EXIT |
XK.SAMP.COB is the source code where the macro to be executed...
1PP 5668-958 IBM VS COBOL II Release 4.0 09/15/92
Code: |
Invocation parameters:
NOSEQ,QUOTE,OFFSET,LIB,RES,RENT,NODYNAM,DBCS,OPT,TRUNC(BIN),NUMPROC(NOP
0Options in effect:
ADV
QUOTE
NOAWO
BUFSIZE(4096) |
and MAC2 is the original macro that is below
ADDRESS ISREDIT
"MACRO"
"EXCLUDE ALL 'IBM VS COBOL II'"
"DELETE ALL X"
"SAVE"
"END"
But this jcl is giving RC 00 , but result of macro is not appearing in the source code dataset XK.SAMP.COB.Please advise.
and in sysout iam getting only below
READY
END
************ |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
As you should be aware by now, it helps if you use the code tags to present your code properly. Not using them means spaces can be removed so what you post is not a true representation of your code/JCL/control cards/data. It is possible that some people who might repond do not bother to respond those who do not bother to post in a manner that provides all possible assistance to the forum.
Now, what diagnostics have you tried? Trace? a few SAYs of relevant variables (eg the dataset that you are trying to edit)? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Code: |
//SYSTSIN DD *
//* PROFILE PREFIX(UP8752) |
You probably have no records in the SYSTSIN file. I think the first record terminates the flle. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
If you have a look-see you will probably find a generated //SYSIN DD * because your //* terminates your SYSTSIN as it is a valid JCL card. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
And you'll need DD DATA, with a delimiter, instead of the DD * if you want to have anything which looks a bit like JCL/JECL/whatnot in your data-stream. |
|
Back to top |
|
|
|