Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] how to test the return code from a DYNAM command and avoid ABEND
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] how to test the return code from a DYNAM command and avoid ABEND
 Login/Join
 
Member
posted
My co-worker and I are trying to figure out a way to prevent a mainframe job from abending when a certain FOCUS return code is encountered. The objective is for the job to test her access to a variety of datasets. So our question is this: How does one test the return code from the DYNAM command? The &FOCERRNUM and the &RETCODE don’t seem to work. Instead, JES2 does not return the error to FOCUS to be tested, and so the job simply abends with a JCL error. We'd like to capture the error, and continue testing access to the other DSN's. Thanks in advance for any wisdom you can share!

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, All Outputs
 
Posts: 3 | Registered: March 30, 2016Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Nancy

I passed this post on to the FOCWIZARD in NY. DYNAM just points FOCUS to a dataset it doesn't actually access it. So in order to test it the user needs to actually try to run a report against the dataset once it is allocated. That said it is not clear what return codes you want to test for and what the JCL error is.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1558 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Gold member
posted Hide Post
Hi Nancy

I bet it's been 10 years since I actively developed on MVS. But - I have a thought for you to experiment with.

Read up on doing LISTDS from inside your Focexec.

It looks like LISTDS might be able to show you those security attributes if the database exists, and it will tell you if the dataset isn't there.

It's just a thought. If you using the Search option in FocalPoint and type in LISTDS, you'll get a few things. It might help to just experiment with it or google the subject to see if it would be of value to you.

Good luck!
Toby
LISTDS command
 
Posts: 62 | Registered: October 31, 2006Reply With QuoteReport This Post
Gold member
posted Hide Post
DYNAM does support &RETCODE. Try the following fex in TSO:
  
DYNAM ALLOC FILE WHOBAR DSNAME PGMEW.FEX.DATA SHR REU
-TYPE RETCODE IS &RETCODE                            
DYNAM FREE FILE WHOBAR                               
-TYPE RETCODE IS &RETCODE                            
DYNAM FREE FILE FOOBAR                               
-TYPE RETCODE IS &RETCODE                            
-EXIT  
 


> > ex test
RETCODE IS 0
RETCODE IS 0
RETCODE IS 8
> >


IBI Development
 
Posts: 57 | Registered: November 15, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] how to test the return code from a DYNAM command and avoid ABEND

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.