Can you be more specific on what you are attempting to extract from your parsing of the saved text file? And, why does it have to be in a text file form?
If you are not interested in extracting the data directly from the Output Display Tree you can save it in an outline format
names default to here(1);
dt=open("$SAMPLE_DATA\big class.jmp");
lg = Logistic( Y( :sex ), X( :height ), Target Level( "M" ) );
chiSQ = (report(lg)["Whole Model Test"][numbercolbox(3)]<<get)[1];
show( chiSQ );
report(lg)<<journal;
txtVal = char( current journal()<<get script);
Save Text File("your path", txtVal );
The output looks like this:
"New Window(\!"Untitled\!", <<Journal, Journal Box(\!"ListBox(vertical,near,sub(
OwnerBox(sub(
OutlineBox(
open(1),title(\!\!\!"Response Y\!\!\!"),rerun(Fit Model(Y(:Y), Effects(:X1, :X2, :X1 * :X2), Personality(\!\!\!"Standard Least Squares\!\!\!"), Emphasis(\!\!\!"Effect Leverage\!\!\!"), Run(:Y << {Summary of Fit(1), Analysis of Variance(1), Parameter Estimates(1), Lack of Fit(0), Scaled Estimates(0), Plot Actual by Predicted(1), Plot Regression(0), Plot Residual by Predicted(1), Plot Studentized Residuals(0), Plot Effect Leverage(1), Plot Residual by Normal Quantiles(0), Box Cox Y Transformation(0)}))),Context({Y(\!\!\!"Y\!\!\!")}),default font id(2),helpKey(\!\!\!"FitLS\!\!\!"),sub(
WrapListBox(sub(
OutlineBox(
open(1),title(\!\!\!"Whole Model\!\!\!"),default font id(2),helpKey(\!\!\!"FitLS Whole\!\!\!"),sub(
OutlineBox(
open(1),title(\!\!\!"Actual by Predicted Plot\!\!\!"),default font id(2),helpKey(\!\!\!"Fit YByPred\!\!\!"),sub(
PictureBox(sub(
BorderBox(top(8),left(5),bottom(8),right(14),sides(16384),options(0),xmin(0),ymin(0),sub(
ScaleBox(id(1),axis(scaleType(0),scaleOrig(-2),scaleWidth(14),widthMajor(2),
nbin(7),nminor(0),timeCode(0),ndec(0),ndecSpec(99),FieldWidth(9),
MinInitInt(-2),MaxInitInt(12),LinearInit,MajorInit(2),MinorInit(0),NObsInit(100),
options(prohibitLogScale,showMajorTicks,showMinorTicks,showLabels,noMinorTickLabelsOnLogAxis,),scaleTypeOptions(),nLabelRows(1),labelRows(LabelRowNumeric(default font id(7),),),labelRows12(LabelRowContinuous(options(0),Automatic Font Size(0),Automatic Tick Marks(0),Inside Ticks(0),Label Alignment(\!\!\!"Near\!\!\!"),Label Buffer Scale(1),Label Orientation(\!\!\!"Horizontal\!\!\!"),Lax Label Range(0),Line Color(2147483647),Line Width(1),Major Grid Line Color(-14145495),Minimum Depth(0),Minimum Font Size(7),Minor Grid Line Color(-15790320),Show Major Grid(0),Show Major Labels(1),Show Major Ticks(1),Show Minor Grid(0),Show Minor Labels(0),Show Minor Ticks(1),Tick Offset(0),Truncate format to interval(1),Wrap Lines(0),default font id(7),),),),length(266),baselength(266),sub(
ScaleBox(id(2),axis(scaleType(0),scaleOrig(-2),scaleWidth(14),widthMajor(2),
nbin(7),nminor(0),timeCode(0),ndec(0),ndecSpec(99),FieldWidth(9),
MinInitInt(-2),MaxInitInt(12),LinearInit,MajorInit(2),MinorInit(0),NObsInit(100),
options(showMajorTicks,showMinorTicks,showLabels,noMinorTickLabelsOnLogAxis,),scaleTypeOptions(),nLabelRows(1),labelRows(LabelRowNumeric(default font id(7),),),labelRows12(LabelRowContinuous(options(0),Automatic Font Size(0),Automatic Tick Marks(0),Inside Ticks(0),Label Alignment(\!\!\!"Near\!\!\!"),Label Buffer Scale(1),Label Orientation(\!\!\!"Horizontal\!\!\!"),Lax Label Range(0),Line Color(2147483647),Line Width(1),Major Grid Line Color(-14145495),Minimum Depth(0),Minimum Font Size(7),Minor Grid Line Color(-15790320),Show Major Grid(0),Show Major Labels(1),Show Major Ticks(1),Show Minor Grid(0),Show Minor Labels(0),Show Minor Ticks(1),Tick Offset(0),Truncate format to interval(1),Wrap Lines(0),default font id(7),),),),length(200),baselength(200),sub(
ListBox(horizontal,near,sub(
AxisBox(side(R),size(44,200),locked(false),scales(0,2,0,2),sub(
TextEditBox(\!\!\!"Y Actual\!\!\!",default font id(9),wrapWidth(200),justification(1),vjustification(1),left,minSize(16,43),maxSize(16,43),BaseSize(0,0),sizeID(0,-1),))),
ListBox(vertical,near,sub(
FrameBox(size(266,200),border(12303),flags(0),markerSize(-1),ndisallow(1),disallow(\!\!\!"Background Map\!\!\!"),scales(1,2,1,2),seg(
,LineSeg(description(\!\!\!"Line of Mean\!\!\!"),properties(color(5), width(2), transparency(0.75)),n(2),x(-9,22.5),y(4.910450521166,4.910450521166),log curve(false),selectable(false),selectionMode(0),),IfSeg(description(\!\!\!"0.05 Significance Curve\!\!\!"),sub(
PolySeg(n(174),
x(-9,-8.5078125,-8.015625,-7.5234375,-7.03125,-6.5390625,-6.046875,-5.5546875,-5.0625,-4.5703125,
-4.078125,-3.5859375,-3.09375,-2.6015625,-2.109375,-1.6171875,-1.125,-0.6328125,-0.140625,0.10546875,
0.3515625,0.59765625,0.84375,1.08984375,1.3359375,1.58203125,1.828125,2.07421875,2.3203125,2.56640625,
2.8125,3.05859375,3.3046875,3.55078125,3.796875,4.04296875,4.2890625,4.53515625,4.78125,5.02734375,
5.2734375,5.51953125,5.765625,6.01171875,6.2578125,6.50390625,6.75,6.99609375,7.2421875,7.48828125,
7.734375,7.98046875,8.2265625,8.47265625,8.71875,8.96484375,9.2109375,9.45703125,9.703125,9.94921875,
10.1953125,10.44140625,10.6875,11.1796875,11.671875,12.1640625,12.65625,13.1484375,13.640625,14.1328125,
14.625,15.1171875,15.609375,16.1015625,16.59375,17.0859375,17.578125,18.0703125,18.5625,19.0546875,
19.546875,20.0390625,20.53125,21.0234375,21.515625,22.0078125,22.5,22.5,22.0078125,21.515625,
21.0234375,20.53125,20.0390625,19.546875,19.0546875,18.5625,18.0703125,17.578125,17.0859375,16.59375,
16.1015625,15.609375,15.1171875,14.625,14.1328125,13.640625,13.1484375,12.65625,12.1640625,11.671875,
11.1796875,10.6875,10.44140625,10.1953125,9.94921875,9.703125,9.45703125,9.2109375,8.96484375…
Also, the output can be saved in an XML data structure
xmlVal = char(report(lg)<<get xml);
Save Text File("your path", xmlVal );
It's output looks like
<OutlineBox width=\!"418\!" height=\!"697\!" helpKey=\!"Logistic Report\!" isOpen=\!"true\!">Logistic Fit of sex By height<IfBox leftOffset=\!"12\!" topOffset=\!"25\!" width=\!"405\!" height=\!"319\!" isTrue=\!"true\!">
<PictureBox width=\!"405\!" height=\!"319\!">
<BorderBox width=\!"405\!" height=\!"319\!">
<ScaleBox leftOffset=\!"5\!" topOffset=\!"5\!" width=\!"395\!" height=\!"309\!" charID=\!"1\!" ID=\!"1\!">
<ScaleBox width=\!"395\!" height=\!"309\!" charID=\!"2\!" ID=\!"2\!">
<ScaleBox width=\!"395\!" height=\!"309\!" charID=\!"3\!" ID=\!"3\!">
<ListBox width=\!"395\!" height=\!"309\!">
<AxisBox width=\!"56\!" height=\!"269\!" charID=\!"2\!">
<DropBox leftOffset=\!"0\!" topOffset=\!"126\!" width=\!"18\!" height=\!"16\!">
<TextEditBox width=\!"18\!" height=\!"16\!">sex</TextEditBox>
</DropBox>
</AxisBox>
<ListBox leftOffset=\!"56\!" topOffset=\!"0\!" width=\!"321\!" height=\!"309\!">
<FrameBox width=\!"321\!" height=\!"269\!" helpKey=\!"FitNom Plot\!">
<SegPlaceholder description=\!"Grid Lines\!"/>
<SegPlaceholder description=\!"Reference Lines\!"/>
<IfSeg description=\!"Probability Curves\!" isTrue=\!"true\!">
<LineSeg/>
</IfSeg>
<IfSeg isTrue=\!"true\!">
<MarkerSeg/>
</IfSeg>
<IfSeg isTrue=\!"false\!">
<LineSeg description=\!"Rate Curve\!"/>
</IfSeg>
</FrameBox>
<AxisBox leftOffset=\!"0\!" topOffset=\!"269\!" width=\!"321\!" height=\!"40\!" charID=\!"1\!">
<DropBox leftOffset=\!"143\!" topOffset=\!"24\!" width=\!"35\!" height=\!"16\!">
<TextEditBox width=\!"35\!" height=\!"16\!">height</TextEditBox>
</DropBox>
</AxisBox>
</ListBox>
<AxisBox leftOffset=\!"377\!" topOffset=\!"0\!" width=\!"18\!" height=\!"269\!" charID=\!"3\!"/>
</ListBox>
</ScaleBox>
</ScaleBox>
</ScaleBox>
</BorderBox>
</PictureBox>
</IfBox>
<OutlineBox leftOffset=\!"12\!" topOffset=\!"344\!" width=\!"94\!" height=\!"25\!" helpKey=\!"Logistic Iterations Report\!" isOpen=\!"false\!">Iterations<TableBox leftOffset=\!"12\!" topOffset=\!"25\!">
<NumberColBox>
<NumberColBoxHeader>Iter</NumberColBoxHeader>
<NumberColBoxItem>0</NumberColBoxItem>
<NumberColBoxItem>1</NumberColBoxItem>
<NumberColBoxItem>2</NumberColBoxItem>
<NumberColBoxItem>3</NumberColBoxItem>
<NumberColBoxItem>4</NumberColBoxItem>
</NumberColBox>
<NumberColBox>
<NumberColBoxHeader>Objective</NumberColBoxHeader>
<NumberColBoxItem>27.725887222</NumberColBoxItem>
<NumberColBoxItem>24.82346039</NumberColBoxItem>
<NumberColBoxItem>24.775518767</NumberColBoxItem>
<NumberColBoxItem>24.775389091</NumberColBoxItem>
<NumberColBoxItem>24.77538909</NumberColBoxItem>
</NumberColBox>
<NumberColBox>
<NumberColBoxHeader>Relative Gradient</NumberColBoxHeader>
<NumberColBoxItem>2.3440989376</NumberColBoxItem>
<NumberColBoxItem>0.3046124766</NumberColBoxItem>
<NumberColBoxItem>0.0160880971</NumberColBoxItem>
<NumberColBoxItem>0.0000491383</NumberColBoxItem>
<NumberColBoxItem>4.622843e-10</NumberColBoxItem>
</NumberColBox>
<NumberColBox>
<NumberColBoxHeader>Norm Gradient</NumberColBoxHeader>
<NumberColBoxItem>155.01290269</NumberColBoxItem>
<NumberColBoxItem>6.4687304657</NumberColBoxItem>
<NumberColBoxItem>0.0335930795</NumberColBoxItem>
<NumberColBoxItem>0.0003601736</NumberColBoxItem>
<NumberColBoxItem>5.6284711e-9</NumberColBoxItem>
</NumberColBox>
</TableBox>
</OutlineBox>
<OutlineBox leftOffset=\!"12\!" topOffset=\!"369\!" width=\!"374\!" height=\!"182\!" helpKey=\!"FitNom Whole\!" isOpen=\!"true\!">Whole Model Test<TableBox leftOffset=\!"12\!" topOffset=\!"25\!" width=\!"361\!" height=\!"70\!">
<StringColBox width=\!"61\!" height=\!"68\!">
<StringColBoxHeader>Model</StringColBoxHeader>
<StringColBoxItem>Difference</StringColBoxItem>
<StringColBoxItem>Full</StringColBoxItem>
<StringColBoxItem>Reduced</StringColBoxItem>
</StringColBox>
<NumberColBox leftOffset=\!"61\!" topOffset=\!"0\!" width=\!"95\!" height=\!"68\!">
<NumberColBoxHeader>-LogLikelihood</NumberColBoxHeader>
<NumberColBoxItem>2.750163</NumberColBoxItem>
<NumberColBoxItem>24.775389</NumberColBoxItem>
<NumberColBoxItem>27.525553</NumberColBoxItem>
</NumberColBox>
<NumberColBox leftOffset=\!"156\!" topOffset=\!"0\!" width=\!"58\!" height=\!"34\!">
<NumberColBoxHeader>DF</NumberColBoxHeader>
<NumberColBoxItem>1</NumberColBoxItem>
</NumberColBox>
<NumberColBox leftOffset=\!"214\!" topOffset=\!"0\!" width=\!"68\!" height=\!"34\!">
<NumberColBoxHeader>ChiSquare</NumberColBoxHeader>
<NumberColBoxItem>5.500327</NumberColBoxItem>
</NumberColBox>
<NumberColBox leftOffset=\!"282\!" topOffset=\!"0\!" width=\!"78\!" height=\!"34\!">
<NumberColBoxHeader>Prob>ChiSq</NumberColBoxHeader>
<NumberColBoxItem>0.0190*</NumberColBoxItem>
</NumberColBox>
</TableBox>
<TextBox leftOffset=\!"12\!" topOffset=\!"95\!" width=\!"6\!" height=\!"16\!"></TextBox>
<TableBox leftOffset=\!"12\!" topOffset=\!"111\!" width=\!"208\!" height=\!"70\!">
<StringColBox width=\!"155\!" height=\!"68\!">
<StringColBoxHeader></StringColBoxHeader>
<StringColBoxItem>RSquare (U)</StringColBoxItem>
<StringColBoxItem>AICc</StringColBoxItem>
<StringColBoxItem>BIC</StringColBoxItem>
<StringColBoxItem>Observations (or Sum Wgts)</StringColBoxItem>
</StringColBox>
<ColStackBox leftOffset=\!"155\!" topOffset=\!"0\!" width=\!"52\!" height=\!"68\!">
<ColStackBoxHeader></ColStackBoxHeader>
<NumberColBox width=\!"52\!" height=\!"17\!">
<NumberColBoxHeader></NumberColBoxHeader>
<NumberColBoxItem>0.0999</NumberColBoxItem>
</NumberColBox>
<NumberColBox leftOffset=\!"0\!" topOffset=\!"17\!" width=\!"52\!" height=\!"17\!">
<NumberColBoxHeader></NumberColBoxHeader>
<NumberColBoxItem>53.8751</NumberColBoxItem>
</NumberColBox>
<NumberColBox leftOffset=\!"0\!" topOffset=\!"34\!" width=\!"52\!" height=\!"17\!">
<NumberColBoxHeader></NumberColBoxHeader>
<NumberColBoxItem>56.9285</NumberColBoxItem>
</NumberColBox>
<NumberColBox leftOffset=\!"0\!" topOffset=\!"51\!" width=\!"52\!" height=\!"17\!">
<NumberColBoxHeader></NumberColBoxHeader>
<NumberColBoxItem>40</NumberColBoxItem>
</NumberColBox>
</ColStackBox>
</TableBox>
</OutlineBox>
<OutlineBox leftOffset=\!"12\!" topOffset=\!"551\!" width=\!"96\!" height=\!"25\!" isOpen=\!"false\!">Fit Details<TableBox leftOffset=\!"12\!" topOffset=\!"25\!">
<StringColBox>
<StringColBoxHeader>Measure</StringColBoxHeader>
<StringColBoxItem>Entropy RSquare</StringColBoxItem>
<StringColBoxItem>Generalized RSquare</StringColBoxItem>
<StringColBoxItem>Mean -Log p</StringColBoxItem>
<StringColBoxItem>RASE</StringColBoxItem>
<StringColBoxItem>Mean Abs Dev</StringColBoxItem>
<StringColBoxItem>Misclassification Rate</StringColBoxItem>
<StringColBoxItem>N</StringColBoxItem>
</StringColBox>
<ColStackBox>
<ColStackBoxHeader></ColStackBoxHeader>
<NumberColBox>
<NumberColBoxHeader>Training</NumberColBoxHeader>
<NumberColBoxItem>0.0999</NumberColBoxItem>
<NumberColBoxItem>0.1719</NumberColBoxItem>
<NumberColBoxItem>0.6194</NumberColBoxItem>
<NumberColBoxItem>0.4617</NumberColBoxItem>
<NumberColBoxItem>0.4286</NumberColBoxItem>
<NumberColBoxItem>0.3500</NumberColBoxItem>
</NumberColBox>
<NumberColBox>
<NumberColBoxHeader></NumberColBoxHeader>
<NumberColBoxItem>40</NumberColBoxItem>
</NumberColBox>
</ColStackBox>
<StringColBox>
<StringColBoxHeader>Definition</StringColBoxHeader>
<StringColBoxItem>1-Loglike(model)/Loglike(0)</StringColBoxItem>
<StringColBoxItem>(1-(L(0)/L(model))^(2/n))/(1-L(0)^(2/n))</StringColBoxItem>
<StringColBoxItem>∑ -Log(ρ[j])/n</StringColBoxItem>
<StringColBoxItem>√ ∑(y[j]-ρ[j])²/n</StringColBoxItem>
<StringColBoxItem>∑ |y[j]-ρ[j]|/n</StringColBoxItem>
<StringColBoxItem>∑ (ρ[j]≠ρMax)/n</StringColBoxItem>
<StringColBoxItem>n</StringColBoxItem>
</StringColBox>
</TableBox>
</OutlineBox>
<OutlineBox leftOffset=\!"12\!" topOffset=\!"576\!" width=\!"350\!" height=\!"120\!" helpKey=\!"FitNom ParmEst\!" isOpen=\!"true\!">Parameter Estimates<TableBox leftOffset=\!"12\!" topOffset=\!"25\!" width=\!"337\!" height=\!"53\!">
<StringColBox width=\!"54\!" height=\!"51\!">
<StringColBoxHeader>Term</StringColBoxHeader>
<StringColBoxItem>Intercept</StringColBoxItem>
<StringColBoxItem>height</StringColBoxItem>
</StringColBox>
<StringColBox leftOffset=\!"54\!" topOffset=\!"0\!" width=\!"0\!" height=\!"51\!">
<StringColBoxHeader>~Bias</StringColBoxHeader>
<StringColBoxItem></StringColBoxItem>
<StringColBoxItem></StringColBoxItem>
</StringColBox>
<NumberColBox leftOffset=\!"54\!" topOffset=\!"0\!" width=\!"71\!" height=\!"51\!">
<NumberColBoxHeader>Estimate</NumberColBoxHeader>
<NumberColBoxItem>-12.267957</NumberColBoxItem>
<NumberColBoxItem>0.19939641</NumberColBoxItem>
</NumberColBox>
<NumberColBox leftOffset=\!"125\!" topOffset=\!"0\!" width=\!"65\!" height=\!"51\!">
<NumberColBoxHeader>Std Error</NumberColBoxHeader>
<NumberColBoxItem>5.9870108</NumberColBoxItem>
<NumberColBoxItem>0.0954697</NumberColBoxItem>
</NumberColBox>
<NumberColBox leftOffset=\!"190\!" topOffset=\!"0\!" width=\!"68\!" height=\!"51\!">
<NumberColBoxHeader>ChiSquare</NumberColBoxHeader>
<NumberColBoxItem>4.20</NumberColBoxItem>
<NumberColBoxItem>4.36</NumberColBoxItem>
</NumberColBox>
<NumberColBox leftOffset=\!"258\!" topOffset=\!"0\!" width=\!"78\!" height=\!"51\!">
<NumberColBoxHeader>Prob>ChiSq</NumberColBoxHeader>
<NumberColBoxItem>0.0405*</NumberColBoxItem>
<NumberColBoxItem>0.0367*</NumberColBoxItem>
</NumberColBox>
</TableBox>
<IfBox leftOffset=\!"12\!" topOffset=\!"78\!" isTrue=\!"false\!" isVisible=\!"false\!">
<TextBox></TextBox>
</IfBox>
<TextBox leftOffset=\!"12\!" topOffset=\!"78\!" width=\!"107\!" height=\!"16\!">For log odds of M/F</TextBox>
<OutlineBox leftOffset=\!"12\!" topOffset=\!"94\!" width=\!"191\!" height=\!"25\!" helpKey=\!"Logistic Covariance\!" isOpen=\!"false\!">Covariance of Estimates<MatrixBox leftOffset=\!"12\!" topOffset=\!"25\!">Cov
<MatrixBoxRowName>Intercept</MatrixBoxRowName>
<MatrixBoxRowName>height</MatrixBoxRowName>
<MatrixBoxColName>Intercept</MatrixBoxColName>
<MatrixBoxColName>height</MatrixBoxColName>
<MatrixBoxCell>35.844</MatrixBoxCell>
<MatrixBoxCell>-0.571</MatrixBoxCell>
<MatrixBoxCell>-0.571</MatrixBoxCell>
<MatrixBoxCell>0.0091</MatrixBoxCell>
</MatrixBox>
</OutlineBox>
</OutlineBox>
</OutlineBox>
Jim