Question

How to check for and end a function automatically

Asked by: joe90kane

Hi,

I have an iSeries that runs a bespoke ERP application and every couple of days I get a function in wrkactjob

IDX-FNCSECPF - Its always related to a user and stops anyone else from opening the application.
I have to manually end the function with *immed and wait 3/4 mins for it to end.

Is there anyway to check for and automatically end these functions as they appear.

Thanks, J

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-09-01 at 01:30:42ID24697251
Topics

Programming for iSeries / AS400

,

AS / 400

,

Operating Systems Miscellaneous

Participating Experts
2
Points
500
Comments
14

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. extension *.idx
    I found in a folder hundred of files with extension *.idx . Does anyone knows what they are?
  2. Exchange, AD and ERP Oracle
    I am looking for tools/methods to reconcile the Human Resources information hosted by the HR ERP (Oracle) with the information found in AD Any mod made in ERP should be applied to AD automaticallyin case of updates or manually if a new user is added to ERP or invalidated in ...
  3. .IDX files
    I am looking to try and access a file structure that is being provided to by PNC bank It has an XML index to a set of sub directories (Date Time), and a set of .IDX files. The are structured in a data time folder then a Pinacle folder. The data has a set of IDX files and...
  4. Getting info of a field from an idx file
    Hello, is it possible to get the info from a foxpro idx file related to a field on a dbf to recover info. A table field was lost yesterday and the only what I have is the IDX file with the field info.
  5. query php in iseries
    I am connecting a page of php to a servant iseries ibm, this it(he,she) connects me without problem but when I try filterthe information the following mistake goes out for me Warning: odbc_exec(): SQL error: [IBM][iSeries Access ODBC Driver][DB2 UDB]SQL0104 - Token = was no...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: Gary_The_IT_ProPosted on 2009-09-01 at 02:31:58ID: 25229735

"IDX - FNCSECPF" indicates that the database management system system is building an index over the FNCSECPF file.  The name makes me think this is a security file, perhaps (Function Security File? Finance Security File?).  

Several things could be happening:  Some job could be deleting and recreating a critical index for some reason.  The job could be building a temporary index using an SQL query or classic query (OPNQRYF, for example), and locking some critical object or objects while that happens.  Maybe you have a deadlock between two processes each locking an object that the other needs.

The real key here is to determine WHY you are getting other jobs hung up during an index build.

Repeatedly killing the process building the index build can possibly cause problems or damage critical data.  Yes, you could conceivably write a program that monitored every job on your system (or a subset of jobs), and started a  timer every time it found a job indexing FNCSECPF, and then have it terminate the job if it ran "too long".  There's no telling what damage you might be doing by repeatedly terminating these  jobs, though.

That's REALLY not the way to solve this problem, though.

Do you get any error messages in the other jobs indicating that there is a problem, or do they just hang?

How big is the FNCSECPF file? (DSPFD command will give you the record count)?

The next time this happens, before you kill the IDX job, quickly collect some basic information by prompting option "5" (DSPJOB) from WRKACTJOB, and selecting *PRINT *ALL.  Then make a note of the job name (name, user, job number), and use the DSPJOBLOG command to print a joblog for the offending job.

The DSPJOB output will tell us the name of the program that is currently running (Call Stack), and a list of all the objects that it has locked.  The joblog may give us more info about the specific function, or may contain useful diagnostic messages.  Look at the bottom of the Call Stack and see if you can identify the problem-causing program or procedure.  Also try to locate the source code for that program on the system.  IF you don't know how to do that post back for help.

It might be handy to do the same procedure (before killing the problem job) with one of the other jobs that is hung waiting on your IDX job.

If the same index is being created over and over, you may be able to solve the problem by just creating a permanent version of the index.  That will cause the index creation step to be skipped, and may eliminate the problem.  If it is a custom index that changes each time, then things might be a bit more complicated.

Post as much as you can: job log, DSPJOB output, source code of IDX program, plus the joblog, DSPJOB and source code of any one of the other hung programs.

Problems like these can be tough to troubleshoot like this, so please be patient and provide as much info as possible.

- Gary Patterson

Check out my EE profile:  http://www.experts-exchange.com/M_4382324.html

 

by: joe90kanePosted on 2009-09-01 at 03:58:12ID: 25230207

Thanks for that port Gary, I will post all the info as soon as it happens again, it may be a few days, mods can you leave this post open until I post back.

Thanks, Joe

 

by: tliottaPosted on 2009-09-02 at 13:39:11ID: 25245443

Joe:

I wasn't aware that an index rebuild could be canceled. That is, the job can certainly be ended; but I would expect that the actual rebuild itself would cause end-of-job to be delayed until the index was finally created. I picked up the impression somewhere years back that index rebuilds (the IDX activity itself) happened within a single MI transaction. That would explain why it takes a few minutes actually to end.

If that's true, then getting DSPJOB output _might_ be difficult. The DSPJOB command, for example, _might_ delay itself until the MI boundary is reached. But that in itself would be useful info. (I'm not sure if current releases handle MI boundaries in this area differently from years past.)

Regardless, Gary is going in the right directions, given the info so far. Just be aware that you _might_ run into a frustration or two when you attempt to gather the info for him. Be prepared for possible delays in system responses when this condition arises.

Tom

 

by: joe90kanePosted on 2009-09-03 at 01:41:44ID: 25248797

I got another one this morning, I was able to get a few screenshots which I hope will help.

Thanks, Joe

 

by: Gary_The_IT_ProPosted on 2009-09-03 at 12:07:24ID: 25253870

Well, from the call stack, it looks like Program SYSOBJLIB/SY0010C at line 7300 is causing the problem.  

It looks like it may be making a copy of the file into QTEMP.  Not sure why that would lock the other users, though.  Really gonna need to see the source code for that program to diagnose further.

From the WRKACTJOB, it looks like this is everyone's startup program.

Let's see if we can find the source code for this program.  Use this command to display basic info about the program:

DSPPGM PGM(SYSOBJLIB/SY0010C)

(Post that output if you have trouble)

From the call stack and the job log, ,this is an OPM CL program, so the Source Library, File, and Member should be listed on the first page.

You can use STRSEU (F4 to prompt) option 5 command to view the source code if it is still in the same location as when the program was compiled.  Be aware that it could have been moved, or it is also possible that source code was not delivered or was deleted from your system.

If that is the case we may be able to use the RTVCLSRC command to retrieve the source into any handy source file (a QCLSRC exists in QGPL that is usually OK to use).

If it is just a couple of pages, you can just do screen prints.  I suspect it is longer.  If that is the case, you can download it to a text file using the Client Access File Transfer function.  (Actions - Receive File from Host).  On the DETAILS button, select ASCII Text as the format, and have the system translate to ASCII.

Post the text file here after looking through it to make sure it doesn't contain any user profile or password info that might be confidential.  CL's usually don't but you should always look before posting to a public forum.

- Gary Patterson

Check out my EE profile:  http://www.experts-exchange.com/M_4382324.html


 

by: tliottaPosted on 2009-09-03 at 12:22:25ID: 25254010

Joe:

Two details --

1. The time on WRKACTJOB is 09:07:57.
2. Joblog shows job start time as 08:59:08.

Your earlier description indicates that some time passes while the condition exists.

Does this example mean that practically nothing was done by the user during this session? Did this condition arise during the startup of the interactive job?

The call stack shows program SY0010C from library SYOBJLIB. I'd expect that to be something maybe like some kind of "system-wide" program that might have been written to run automatically when this user (or users in the same group or even all users) sign on. Do you know what SY0010C is intended to do? Do you have a developer who is familiar with it?

Tom

 

by: tliottaPosted on 2009-09-03 at 12:25:00ID: 25254031

Ah. Gary's here. Sorry, didn't see you before I <submitted>. Good luck.

Tom

 

by: joe90kanePosted on 2009-09-04 at 01:52:15ID: 25257749

Hi Gary, Tom,

Here is the output from RTVCLSRC PGM(SY0010C) SRCFILE(QGPL/QCLSRC)

Thanks for the help.

 

by: joe90kanePosted on 2009-09-04 at 02:00:43ID: 25257787

I should say SY0010 is a menu on the application, each user when they signon the Application starts and loads to a specfic menu.
The error seems to occur only when the users signon - at the point were the application is loading.

 

by: Gary_The_IT_ProPosted on 2009-09-04 at 06:51:40ID: 25259650

The source code that you posted is for the system startup program QSTRUP.  

I'm not sure how you downloaded it, but I suspect that you got the *FIRST member of the QGPL/QCLSRC file instead of  the SY0010C member.

If you used Client Access File Transfer function, you would specify:

QGPL/QCLSRC(SY0010C)

- Gary Patterson

Check out my EE profile:  http://www.experts-exchange.com/M_4382324.html

   

 

by: joe90kanePosted on 2009-09-04 at 08:58:22ID: 25260879

Yes sorry about that here is the source - I spoke to the developer and he confirms the issue is when a user signs and and interupts the application loading e.g. hitting enter or F3 etc... causes the lock.

Would be great if there was error correction to cancel the IDX-FNCSECPF as part of the startup program.

 

by: Gary_The_IT_ProPosted on 2009-09-06 at 10:44:48ID: 25270792

As each user signs on to the system, it looks this program makes a private copy of the FNCSECPF file into the job's QTEMP library.  The two lines of code, below, check to see if a copy of FNSECPF exists in the current job's QTEMP library, and if it does not, it copies the version in the library name contained in the FILIB$ data area into QTEMP.  

Once the data is copied, the system will automatically build any required index, this  when you see the job going into the IDX function.  That is perfectly normal.

I'm not sure why this it taking so long to complete - my best guess is that this is a big file, but that would mean that the startup process would run for several minutes for every user.  How long does it take the average user to get through this startup process?  If every user has to wait for a few minutes for the application to get started up, then I'd say this delay in the IDX build is "normal" for this system (sloppy, but normal), and that something else is going on that is causing users to have trouble logging on.

There is a suspicious little block of code (REDISP block) that resets the STKAU$ data area to "0" if user ORION signs on when the FDSCO$ data area contains "PRR" and the STKAU$ data area contains "9".  Does ORION have to sign on after you kill a IDX job in order to allow users to sign on?  If so, this issue may have nothing to do with the FINSECPF index build at all, and that is just what you notice when you look at the jobs since it takes so long to complete.

As Tom indicated before, the IDX step would likely end in the same 3/4 minutes regardless of you killing the job or not.

It would be handy to see the source code for the SY000D display file, if you can track it down.  Maybe you can ask the developer to help you locate it.

The next time this happens, do the same troubleshooting procedure on one of the jobs that is held up and post it here: I'd like to see what it is doing when it hangs (or does it hang?  What exactly happens when you say "stops anyone else from opening the application"?)  I'd like to see the job log, call stack, open files, and locks for one of these blocked jobs, too.

I have no idea why each job would need it's own private copy of a really big  file, or why the developer would structure the application so that one user's action (or lack of action) can lock all the other users out (I suspect that it is just a symptom of poorly-designed or implemented code, and that this is a defect, and not a desirable result.)).  Sounds like the developer is aware of the issue, so we might be wasting our time here if he already knows the cause.

If that is the case, then have the developer (or if he can't another, better programmer!) fix the defect.  It is  hard to diagnose defects like this at a distance, especially when the problem is intermittent and the triggering event is a mystery.  It is usually very easy for an experienced programmer to diagnose them when they can log onto the system and observe the problem in action, and even easier if he is  already familiar with the application and the problem.

Anyway, feel free to post back if you need more help, but what you really need is to get a programmer to diagnose and fix the underlying problem.

- Gary Patterson

Check out my EE profile:  http://www.experts-exchange.com/M_4382324.html

     CHKOBJ OBJ(QTEMP/FNCSECPF) OBJTYPE(*FILE) 
     MONMSG MSGID(CPF0000) EXEC(CRTDUPOBJ OBJ(FNCSECPF) FROMLIB(&FILIB) OBJTYPE(*FILE) TOLIB(QTEMP) DATA(*YES))
                                              
1:
2:

Select allOpen in new window

 

by: joe90kanePosted on 2009-09-10 at 07:43:49ID: 25300719

Thanks for the detailed info Gary

Here is the answer to your questions,

How long does it take the average user to get through this startup process?
Just a few seconds for each user

Does ORION have to sign on after you kill a IDX job in order to allow users to sign on?
Yes I have to signon as ORION to kill the job

I will continue to monitor and post back as much as possible.

Thanks, Joe

 

by: Gary_The_IT_ProPosted on 2009-09-10 at 09:54:05ID: 25302071

I think that signing on as ORION may be what fixes the problem - not killing the job.  Next time this happens, try just logging on as ORION and doing whatever you usually do without killing the job and see if this still frees up your other users.

Check out my EE profile:  http://www.experts-exchange.com/M_4382324.html

- Gary

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...