IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to copy output of jjscan to permanent sequential dataset


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Darshu T

New User


Joined: 06 Sep 2013
Posts: 8
Location: India

PostPosted: Fri Sep 06, 2013 12:13 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2593
Location: Silicon Valley

PostPosted: Fri Sep 06, 2013 6:12 pm
Reply with quote

Use a new edit macro. Within the macro, use the DATASET service to get the name of the dataset.
Back to top
View user's profile Send private message
Darshu T

New User


Joined: 06 Sep 2013
Posts: 8
Location: India

PostPosted: Fri Sep 06, 2013 6:21 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2593
Location: Silicon Valley

PostPosted: Fri Sep 06, 2013 9:16 pm
Reply with quote

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
View user's profile Send private message
Darshu T

New User


Joined: 06 Sep 2013
Posts: 8
Location: India

PostPosted: Wed Sep 11, 2013 12:25 pm
Reply with quote

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
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 199
Location: UK

PostPosted: Wed Sep 11, 2013 1:03 pm
Reply with quote

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
View user's profile Send private message
Darshu T

New User


Joined: 06 Sep 2013
Posts: 8
Location: India

PostPosted: Wed Sep 11, 2013 1:17 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Wed Sep 11, 2013 1:42 pm
Reply with quote

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 icon_cool.gif
Back to top
View user's profile Send private message
Darshu T

New User


Joined: 06 Sep 2013
Posts: 8
Location: India

PostPosted: Wed Sep 11, 2013 2:41 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Wed Sep 11, 2013 3:37 pm
Reply with quote

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
View user's profile Send private message
Darshu T

New User


Joined: 06 Sep 2013
Posts: 8
Location: India

PostPosted: Wed Sep 11, 2013 7:57 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Wed Sep 11, 2013 8:38 pm
Reply with quote

Can you not take a copy of the macro into your own library and modify it to meet your requirements?
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2593
Location: Silicon Valley

PostPosted: Wed Sep 11, 2013 9:02 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2593
Location: Silicon Valley

PostPosted: Wed Sep 11, 2013 9:13 pm
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1787
Location: Bloomington, IL

PostPosted: Wed Sep 11, 2013 9:18 pm
Reply with quote

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
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1314
Location: Vilnius, Lithuania

PostPosted: Wed Sep 11, 2013 9:32 pm
Reply with quote

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
View user's profile Send private message
Darshu T

New User


Joined: 06 Sep 2013
Posts: 8
Location: India

PostPosted: Thu Sep 12, 2013 11:30 am
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2593
Location: Silicon Valley

PostPosted: Thu Sep 12, 2013 5:18 pm
Reply with quote

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
View user's profile Send private message
Darshu T

New User


Joined: 06 Sep 2013
Posts: 8
Location: India

PostPosted: Thu Sep 12, 2013 8:09 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2593
Location: Silicon Valley

PostPosted: Thu Sep 12, 2013 8:43 pm
Reply with quote

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
View user's profile Send private message
rguhanath

New User


Joined: 16 Oct 2006
Posts: 81
Location: chennai

PostPosted: Thu Jul 22, 2021 12:40 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Copy only TEXT or String from a record SYNCSORT 4
No new posts REXX/CMS How to place command console... CLIST & REXX 4
No new posts batch SFTP job using AOPBATCH unable ... All Other Mainframe Topics 7
No new posts Reroute print output via REXX/SDSF TSO/ISPF 6
No new posts Concatenate 2 input datasets and give... JCL & VSAM 2
Search our Forums:

Back to Top