How to save output and use them latter on?

HI everyone,
I have an issue concerning the saving of the results. Indeed, I need to save the results from a notebook in order to be able to use them later on in another notebook. I write the code for that. Basically I get a file which is suppose to contain my result (Fansa_test). But when I try to call the results back, the code takes a while despite the fact that I set the number of replications Rep=0. For example, for rep=9, the results should be


.
But now when I run all the notebook till the last cell which contain the code to save the result. I get the file (Fansa_test), the name I give to it. Now to call the result, (please uncomment << “Fansa_test”; at this stage) in case you are testing the code which follows), set init=“old” instead of init=“new” (to call the stored solution) and set the number of replications Rep=0. The aim is to have the same results (just to load them). But the results don’t show up. I get a long list of values. here is the code

Your support will be very appreciated. Thank you in advance.

Welcome to Wolfram Community!
Please make sure you know the rules: https://wolfr.am/READ-1ST
Please next time, do NOT post massive code and ask to debug it. Minimize your questions to concise code examples pinpointing your issue.

Saving the result of a computation done in one notebook, and then reuse the result in a later Mathematica session? Using Iconize could be a way to do it.

In the source notebook do the computation and Iconize the result:

pairs = SolveValues[{x^2 + y^2 == z^2, x < 20, y < 20, Element[{x, y, z}, PositiveIntegers], x < y}, {x, y}]

Iconize[pairs // Normal, "Saved calculation result"]

Save the source notebook and restart Mathematica.

Open the source notebook. Copy the icon by marking it and Ctrl+C

8325pt.png

Paste the icon in a new notebook and evaluate. The computational results from the source notebook will now be available in the new Mathematica session.

8313pt2.png

Thank you @Hans Milton I’ll try to adapt and see if it work in my case. In my case I used the save command, it’s working in simplest code, but when I try to use it in my more complex code, I don’t get the right thing. I just do not know what is the problem.

Thank you for your time.