Page 1 of 1

S322 abend in JCL

PostPosted: Wed Feb 29, 2012 8:18 pm
by skankatala
Hello,

When I execute my cobol program using JCL, s322 timeout abend is occuring due to Migrated dataset.

If my input dataset is migrated, the job is not calling the dataset. Do I need to write any code to call Migrated dataset at runtime? Can the JCL itself call migrated datasets without user intervention?

I execute that cobol program around 300 times for different inputs. It is hard to check each and every dataset wether it is migrated or not?

Anyone Please help me out...

Re: How to resolve S322 abend occurs due to migrated dataset

PostPosted: Wed Feb 29, 2012 8:30 pm
by Robert Sample
Your FIRST problem is that an S322 is NOT a timeout (which would be an S522). S322 indicates that your job ran -- and was NOT waiting for a migrated data set recall -- and used all of the allowed CPU time (TCB). So your SECOND problem is to figure out whehter you've got a loop in your code or if the task you are running requires additional time to complete -- in which you need to work with your site support group, coworkers, or team leader to determine which job class to run in. Job classes tend to be limited by each site so only someone working AT YOUR SITE could tell you why the job class you used is limited and which job class you should be using for your job.

In other words, you completely misunderstand your problem and are looking at migrated data set recall when migrated data set recall has ABSOLUTELY nothing to do with your problem.

Re: How to resolve S322 abend occurs due to migrated dataset

PostPosted: Wed Feb 29, 2012 8:46 pm
by skankatala
Robert Sample wrote:Your FIRST problem is that an S322 is NOT a timeout (which would be an S522). S322 indicates that your job ran -- and was NOT waiting for a migrated data set recall -- and used all of the allowed CPU time (TCB). So your SECOND problem is to figure out whehter you've got a loop in your code or if the task you are running requires additional time to complete -- in which you need to work with your site support group, coworkers, or team leader to determine which job class to run in. Job classes tend to be limited by each site so only someone working AT YOUR SITE could tell you why the job class you used is limited and which job class you should be using for your job.

In other words, you completely misunderstand your problem and are looking at migrated data set recall when migrated data set recall has ABSOLUTELY nothing to do with your problem.


Robert,

My program has no issue. It is running fine with other datasets.
If dataset is migrated, the job is running for long time and and giving S322 abend after some time. If i manually recall the dataset while job is running, once the recall process completed the job is running normally. The only issue I found that the Job itself is not calling the migrated datasets.

Please let me know if I need to provide more information.

Re: How to resolve S322 abend occurs due to migrated dataset

PostPosted: Wed Feb 29, 2012 9:44 pm
by Robert Sample
If you don't believe me, try the manual:
322

Explanation: One of the following occurred:

The system took a longer time to run a job, job step, or procedure than the time specified in one of the following:

The TIME parameter of the EXEC or JOB statement

The standard time limit specified in the job entry subsystem

For a started task under the master subsystem, the TIME parameter was not specified on the PROC statement of the catalogued procedure, and the PPT entry did not indicate a system task

System Action: The system abnormally ends the job, job step, or procedure.

Application Programmer Response: If the TIME parameter was not specified on the PROC statement of the catalogued procedure, add the TIME parameter or add a PPT entry for the PGM parameter. Otherwise, check for program errors. If none exist, specify a longer time in the TIME parameter. Then run the job again.

Source: System Management Facilities (SMF)
Since you are not willing to believe what the system is telling you the problem is, you need to contact your site support group and work with them on the problem We cannot assist you on this forum.

Re: How to resolve S322 abend occurs due to migrated dataset

PostPosted: Wed Feb 29, 2012 10:14 pm
by skankatala
Sorry Robert, I did not understand what you are saying? May be I didn't explain my issue clearly to you.

Forget sbout S322, please let me know about recall of migrated dataset at runtime without user intervention...

Re: How to resolve S322 abend occurs due to migrated dataset

PostPosted: Wed Feb 29, 2012 10:28 pm
by skankatala
Here I am explaining my issue


1. I wrote a cobol program to search a string in particular position.
2. When I try to execute the cobol program using JCL with different input datasets, it is running fine.
3. If input dataset is migrated, the job is running untill the time specified in TIME parameter, and giving S322 abend.
4. If i did not specify any TIME parameter, the job is running for long time and giving S322 at some point.
5. If i specify TIME parameter as 1440, the job is running running and running untill I cancel the job.
6. If i manually recall the dataset while job is in running status, once the recall process is completed before specified time in TIME parameter, job is executing succesfully without any abend.
7. By considering all the above cases, I confirmed that the issue is with Migrated dataset. Please guide me, If I am wrong...

Please help me to resolve this issue....

Re: How to resolve S322 abend occurs due to migrated dataset

PostPosted: Wed Feb 29, 2012 10:33 pm
by steve-myers
I can only repeat what Mr. Sample has already said. If you specify, in your JCL, something like

//MYDD DD DISP=SHR,DSN=HSM.migrated.dataset

HSM will restore the dataset to live DASD before your job starts. If your program is using "too much" CPU time it may be a problem with your program. Your statement that your program runs OK with other data is meaningless. If it is unable to run with the data it is given, that means only one thing. There is a problem with your program. If you cannot accept this you need to find a different profession.

Re: How to resolve S322 abend occurs due to migrated dataset

PostPosted: Wed Feb 29, 2012 10:44 pm
by enrico-sorichetti
If You are happy with Your wrong problem determination, we are happy, or better we do not give a sith :geek:
with Your attitude and stubbornness the chances of getting help are slim/nonexistent

for what reason You refuse to believe/take into consideration what the manuals tell ?
..I did not understand what you are saying?
is a clear symptom that You are in the wrong profession

Re: How to resolve S322 abend occurs due to migrated dataset

PostPosted: Wed Feb 29, 2012 11:07 pm
by BillyBoyo
skankatala wrote:Here I am explaining my issue


1. I wrote a cobol program to search a string in particular position.
2. When I try to execute the cobol program using JCL with different input datasets, it is running fine.
3. If input dataset is migrated, the job is running untill the time specified in TIME parameter, and giving S322 abend.
4. If i did not specify any TIME parameter, the job is running for long time and giving S322 at some point.
5. If i specify TIME parameter as 1440, the job is running running and running untill I cancel the job.
6. If i manually recall the dataset while job is in running status, once the recall process is completed before specified time in TIME parameter, job is executing succesfully without any abend.
7. By considering all the above cases, I confirmed that the issue is with Migrated dataset. Please guide me, If I am wrong...

Please help me to resolve this issue....

  1. Show us the code please
  2. Means nothing except your code runs with that data
  3. If the dataset is migrated, it is recalled, as has been pointed out several times, before your program starts, What do you think your program is doing before the dataset is there? Sitting trying to execute an OPEN statement? Try changing the existing DDNAME. The dataset will still come back, then your program wil abend (if coded well) when there is no DD statement for it in the JCL.
  4. Probable loop
  5. Probable loop, taking even more time because you don't believe your code can be wrong
  6. Don't know what you mean by this. The recall is already happening, what are you "manually" doing?
  7. By considering all the cases you most likely have a loop in your code

Re: How to resolve S322 abend occurs due to migrated dataset

PostPosted: Wed Feb 29, 2012 11:25 pm
by Robert Sample
7. By considering all the above cases, I confirmed that the issue is with Migrated dataset. Please guide me, If I am wrong...

Please help me to resolve this issue....
YOU ARE WRONG!
As you have been told -- ample times -- that JES will not start your job until the migrated data set is available, and using different data can cause different outcomes in your program, and you refuse to post what you are asked to post nor provide anything other than your (wrong) opinion as to what your problem is, we cannot help you resolve the issue.

This is a program issue. It is not a migrated data set issue. It is not a system issue. It is YOUR program not working with a given set of data, nothing more and nothing less.

Topic is being locked to prevent further waste of time.