View previous topic :: View next topic
|
Author |
Message |
Darshu T
New User
Joined: 06 Sep 2013 Posts: 8 Location: India
|
|
|
|
Hi! I am new to rexx. My requirement is to copy output of jjscan to permanent sequential dataset. I am calling edit macro `JJSCAN` in my rexx program and the output is opening in temporary dataset `Userid.*.*`and the dataset name is constantly changing. The call to JJSCAN is like ADDRESS ISPEXEC "EDIT DATASET('MEMBER') MACRO(JJSCAN)" and its working fine.I want to get the temporary dataset name and copy the contents to permanent sequential dataset or just copy the contents of temporary dataset.
Please help me out. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Use a new edit macro. Within the macro, use the DATASET service to get the name of the dataset. |
|
Back to top |
|
|
Darshu T
New User
Joined: 06 Sep 2013 Posts: 8 Location: India
|
|
|
|
Thanks Pedro.
I was working on the system defined macros but couldn`t reach to solution. I will try to implement the solution you have suggested and will get back to this post if I find any difficulties. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
I am not familiar with JJSCAN, but if you can do this:
Code: |
ADDRESS ISPEXEC "EDIT DATASET('MEMBER') MACRO(JJSCAN)" |
you are probably the one that allocated the dataset! What is the value of MEMBER? You need to determine how you allocated the dataset and perhaps change the allocation to use a permanent dataset. |
|
Back to top |
|
|
Darshu T
New User
Joined: 06 Sep 2013 Posts: 8 Location: India
|
|
|
|
Hi,
Sorry for late reply.
The code:
ADDRESS ISPEXEC "EDIT DATASET('MEMBER') MACRO(JJSCAN)"
is to open the JCL member from desired PDS(DATASET) in edit mode and to run JJSCAN macro.
JJSCAN is projcl product. JJSCAN it self is a macro here. If we type JJSCAN on command line of any JCL and press enter, it will give expanded JCL..that means...in case if JCL is using a proc, then JJSCAN will substitute the symbolic parms and DSN overrides used for proc and it will display entire JCL by expanding all procs.
For this expansion system will create a temp dataset to disply expanded jcl ex: myid.somename.temp1 and also that will displayed in browse mode. if we press F3 system will give "process completed" message and usual JCL (unexpanded one) will be displayed.And temp file will be deleted automatically.
So now my rexx macro will open expanded jcl member in given pds in a temp file and in browse mode; and if we press f3,temp file will be deleted automatically.
I want to copy the temp file to permanent dataset before pressing F3 key and need to work with it.
If any one has any ideas, it will be very helpful to me. Thanks in advance. |
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
A slight workaround, but it may suit your requirements - why don't you run the JCL checker program in batch instead of interactively via the edit macro.
Then you can write the output to whatever dataset you wish. |
|
Back to top |
|
|
Darshu T
New User
Joined: 06 Sep 2013 Posts: 8 Location: India
|
|
|
|
Hi David,
I just want the expanded jcl copied to the permanent dataset. So, any other approach or suggestions are welcomed here.
I am not familiar with the JCL Checker program you have mentioned. Are you talking about program to validate JCL. If so, its not required here.
Could you please explian a little bit about JCL checker program.Thanks in advance. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
if the process is really how You described it ...
Quote: |
invoke jjscan
BROWSE the expanded jcl |
find out if You can substitute VIEW for BROWSE
when You are in VIEW You can CREATE a new something
JJSCAN is a JCL CHECKER |
|
Back to top |
|
|
Darshu T
New User
Joined: 06 Sep 2013 Posts: 8 Location: India
|
|
|
|
Hi Enrico,
I am using System defined edit macro 'JJSCAN' and the the macro is defined to open the expanded jcl in browse mode.
Using macro, I have got the temp file name created. Now,I just want to copy the temp file contents to permanent dataset before F3 key is pressed.
Please let me know if I can design code to copy the contents until some event (F3 key) is triggred.
Please let me also know if you have any other approach to derive the values of symbolic parameters in JCL. Thanks in advance |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
I am using System defined edit macro 'JJSCAN' and the the macro is defined to open the expanded jcl in browse mode. |
again ...
verify with Your support or looking at the JJSCAN docs if You can substitute VIEW for BROWSE
the fact that JJSCAN is a system defined macro/part of a purchased product should not prevent any investigation on possible changes to the current behavior |
|
Back to top |
|
|
Darshu T
New User
Joined: 06 Sep 2013 Posts: 8 Location: India
|
|
|
|
Hi,
Thanks for your replies.
I am still facing problem as I can`t change the System defined macro which I want to use. Also, I am unable to open expanded JCL in view mode.
So, I will now queue all the symbolic parameters set in the JCL and will work with it.
Please let me know if you have any other solution. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Can you not take a copy of the macro into your own library and modify it to meet your requirements? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Quote: |
Can you not take a copy of the macro into your own library and modify it to meet your requirements?
|
FYI. Macros can also be written in a compiled language... it is a good suggestion, but he might not be able to do it. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
More information about the browse please...
1. does the browse use an ISPF panel? use PANELID ON to see.
2. is the dataset name shown in the title of the panel?
More information about the file please...
3. while browsing, issue TSO ISRDDN and look for a DD name with a temporary dataset. Is there a constant DD name used? You might have to invoke your macro a few times to determine if the same DD name is used.
4. while in TSO ISRDDN, can you issue E line command against the temporary dataset? |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
Nic Clouston wrote: |
Can you not take a copy of the macro into your own library and modify it to meet your requirements? |
Mmm...having private versions of GA macros, programs, etc. can be fraught with problems; my team and I generally take the attitude "If it's not in one of our libraries, we don't even bother to look at it". If Darshu-kun is not familiar with Rexx (assuming that JJSCAN is written in Rexx), it may not be a supportable decision. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1314 Location: Vilnius, Lithuania
|
|
|
|
Darshu T wrote: |
... Also, I am unable to open expanded JCL in view mode. ... |
Explain why you've never heard of ISRDDN |
|
Back to top |
|
|
Darshu T
New User
Joined: 06 Sep 2013 Posts: 8 Location: India
|
|
|
|
Hi all,
Thanks for suggestions.
Pedro - The dataset name is shown in the title of the ISPF panel and I got the temp file created each time through my rexx program. Also, I can issue TSO ISRDDN command in the browse mode and Edit the dataset after that but the DD name is constantly changing.
I have tried to execute ISRDDN after Macro execution but the Edit macro 'JJSCAN` is defined to Press F3 key after the temp file is opened in the browse mode. The temp file get deleted until the execution of ISRDDN.
Please help me out to design code into complied language for the above. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Quote: |
I got the temp file created each time through my rexx program |
I do not understand why you cannot allocate a permanent dataset instead of a temporary dataset IN YOUR OWN PROGRAM. please explain.
Try using variable ZSCREENI which contains the image of the screen. Parse out the dataset name and use it to perform the copy. |
|
Back to top |
|
|
Darshu T
New User
Joined: 06 Sep 2013 Posts: 8 Location: India
|
|
|
|
I have tried the ZSCREENI variable too but its giving the PDS name from which the rexx program get executed and not the temp file name (output of JJSCAN edit macro).
Please help me out to design code into complied language for the above |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
This seemed obvious earlier...
Try using variable ZSCREENI, which contains the image of the screen. It will have the logical screen for the screen on which you get the ZSCREENI variable.
Use a rexx program to VGET the ZSCREENI variable. Invoke the rexx program while you are browsing the results file of your jjscan.
and repeating:
Quote: |
I do not understand why you cannot allocate a permanent dataset instead of a temporary dataset IN YOUR OWN PROGRAM. please explain. |
|
|
Back to top |
|
|
rguhanath
New User
Joined: 16 Oct 2006 Posts: 81 Location: chennai
|
|
|
|
Hi,
its longtime.
If you want to take a copy of the JJSCAN output report, use 'Move/Copy' option under "Utilities" at Menu. This may help you.
Thanks,
Nath |
|
Back to top |
|
|
|