How to resolve S322 abend occurs due to migrated dataset?



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

How to resolve S322 abend occurs due to migrated dataset?

Postby skankatala » Wed Feb 29, 2012 8:18 pm

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...
skankatala
 
Posts: 42
Joined: Sun Dec 11, 2011 9:45 am
Location: Hyderabad
Has thanked: 0 time
Been thanked: 0 time

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

 

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

Postby Robert Sample » Wed Feb 29, 2012 8:30 pm

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 Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

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

Postby skankatala » Wed Feb 29, 2012 8:46 pm

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.
skankatala
 
Posts: 42
Joined: Sun Dec 11, 2011 9:45 am
Location: Hyderabad
Has thanked: 0 time
Been thanked: 0 time

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

Postby Robert Sample » Wed Feb 29, 2012 9:44 pm

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

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

Postby skankatala » Wed Feb 29, 2012 10:14 pm

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...
skankatala
 
Posts: 42
Joined: Sun Dec 11, 2011 9:45 am
Location: Hyderabad
Has thanked: 0 time
Been thanked: 0 time

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

Postby skankatala » Wed Feb 29, 2012 10:28 pm

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....
skankatala
 
Posts: 42
Joined: Sun Dec 11, 2011 9:45 am
Location: Hyderabad
Has thanked: 0 time
Been thanked: 0 time

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

Postby steve-myers » Wed Feb 29, 2012 10:33 pm

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.
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

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

Postby enrico-sorichetti » Wed Feb 29, 2012 10:44 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

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

Postby BillyBoyo » Wed Feb 29, 2012 11:07 pm

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
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

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

Postby Robert Sample » Wed Feb 29, 2012 11:25 pm

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post