Program Auto-closes

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
lmangcahan
Posts: 25
Joined: September 7th, 2021, 3:45 am

Program Auto-closes

Post by lmangcahan »

Hi Cspro Team,

Good day. Hope all is well.

I encountered an issue with v7.7.1 wherein the program won't run for testing when I reach 5k+ lines of code. I have also used .apc function to minimize the code length, however, the same result occurs. I wonder if it is expected for CSPro to behave as experienced.

I hope you can help me. Thank you.
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: Program Auto-closes

Post by sherrell »

No, this is not at all expected behavior, CSPro can handle programs much larger.

Could you zip up your program and send it to us? Please be sure to include at least one test case and give us steps to reproduce the crash.

If you'd prefer not to post your program here, please send it to us at cspro@lists.census.gov

Thanks
Sherrell
lmangcahan
Posts: 25
Joined: September 7th, 2021, 3:45 am

Re: Program Auto-closes

Post by lmangcahan »

Hi Sherell,

Thank you for your response. Unfortunately, I was not permitted to share the program. If I can just share how I encounter it.

Facts:
1. My program contains approx. 5000 lines long excluding the report.html file.
2. The report file contains 360 lines of code.
3. The program is apparently for data validation, no data entry included.
4. Data dictionary has the ff: Sections A to S, ID, Interview Summary.
5. The external logic file is less than 100 long.

Scenarios:
1. The function I created works for all data items since it only checks if x = notappl or not invalueset(x). Since our data dictionary is expanding due to user requirements, the function also expands. So, this is when I noticed that it won't run at a certain length.
2. I tried adding an external logic file (.apc), and transferred some of my program functions not related to validating the data items, but the program still won't run. It starts and then it auto-closes.
3. The only scenario that the program runs is when I reduce my codes (which is now 5k line).

https://drive.google.com/file/d/1d_SQmo ... sp=sharing
0:00-03:00 - program not running
0:04-09:00 - I commented on a few lines.
10:00 - program runs

I hope this information is enough. Hoping to hear back from you. Thank you.
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Program Auto-closes

Post by Gregory Martin »

There are limits on the logic size, but they are quite large, so this is a big surprising. Everything gets compiled into one central place, so splitting your logic between external logic files, reports, and the main logic file doesn't really matter since it will all go in one big buffer.

Since you can't share the code, my only advice is to rethink how you're validating the items. In the video I see you have hundreds, if not thousands, of variables defined in PROC GLOBAL. My guess is that there is some way to do what you're doing without declaring so many variables.
Post Reply