Page 1 of 1

Program compiled without error but crashed while generating pff

Posted: November 1st, 2019, 6:34 am
by racharya
Dear All

I have written a very long program (total 8500 lines in apc file) for sample selection from several rosters divided in multiple stratum. While I compile the application it does not give me any error or warning and compiles without a problem. So I believe it should run.

The problem occurs when I run the program. It hangs up and crashes out even before input data screen comes up. I checked the directory and it is not even creating a pff file which it should normally do post entering input datafile name.

I am completely out of ideas about what could be the problem. Will be grateful if anyone can kindly help me solve the issue.

Many thanks
Rajib

Re: Program compiled without error but crashed while generating pff

Posted: November 1st, 2019, 6:49 am
by josh
Check to see if it generates a .err file in the same directory where it would create the pff. If it does open that file in a text editor. It should tell you what the error is.

If not, you can pack the application and send it to cspro@lists.census.gov and we will take a look.

Re: Program compiled without error but crashed while generating pff

Posted: November 1st, 2019, 7:06 am
by racharya
Hi Josh

Could not locate any err file. So I am sending the program as attachment. Will be grateful for you help. Is length of the program as issue at all?

Thanks and looking forward to your advice.

Rajib

Re: Program compiled without error but crashed while generating pff

Posted: November 1st, 2019, 8:16 am
by josh
Yes. I think the problem is the size of the code. More specifically the fact that you have around 7,000 lines in the proc FINAL_SELECTION_OF_ESTABLISHMENTS000. I'm guessing that you are over the limit for the size of a single proc. If you moved some of that logic into user defined functions you should be able to avoid the problem.

I haven't looked at your code in detail but it looks like a lot of repeated logic. Seems like you should be able to eliminate some of that repetition using standard programming techniques like functions, loops, lookup files.

Re: Program compiled without error but crashed while generating pff

Posted: November 1st, 2019, 8:38 am
by racharya
Thanks, Josh. I will write functions to reduce the code. For my knowledge, what is the limit for codes within a single proc?

thanks much, again

Rajib

Re: Program compiled without error but crashed while generating pff

Posted: November 3rd, 2019, 10:33 pm
by racharya
Just to report back - the problem was solved by reducing the codes

Rajib