Program compiled without error but crashed while generating pff

Discussions about CSEntry
Post Reply
racharya
Posts: 6
Joined: October 14th, 2019, 11:56 am

Program compiled without error but crashed while generating pff

Post by racharya » November 1st, 2019, 6:34 am

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

josh
Posts: 1986
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Program compiled without error but crashed while generating pff

Post by josh » November 1st, 2019, 6:49 am

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.

racharya
Posts: 6
Joined: October 14th, 2019, 11:56 am

Re: Program compiled without error but crashed while generating pff

Post by racharya » November 1st, 2019, 7:06 am

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
Attachments
SELECTION.zip
(25.07 KiB) Downloaded 13 times

josh
Posts: 1986
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Program compiled without error but crashed while generating pff

Post by josh » November 1st, 2019, 8:16 am

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.

racharya
Posts: 6
Joined: October 14th, 2019, 11:56 am

Re: Program compiled without error but crashed while generating pff

Post by racharya » November 1st, 2019, 8:38 am

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

racharya
Posts: 6
Joined: October 14th, 2019, 11:56 am

Re: Program compiled without error but crashed while generating pff

Post by racharya » November 3rd, 2019, 10:33 pm

Just to report back - the problem was solved by reducing the codes

Rajib

Post Reply