cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-219949%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ECombine%203%20journals%20into%201%20journal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219949%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20would%20like%20to%20combine%203%20journals%20file%20into%201%2C%20and%20save%20the%20final%20journal%20in%20PDF%20format.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJournal_1%20%3D%20Journal%3AG_Si_Wafer_Table%3C%2FP%3E%3CP%3EJournal_2%20%3D%20Journal%3AG_Si_Wafer_Mapping%3C%2FP%3E%3CP%3EJournal_3%20%3D%20Journal%3AG_Si_Wafer_Reject_Pareto%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20to%20combine%203%20Journals%20into%201%2C%20how%20to%20save%20as%20PDF%2C%20and%20how%20to%20close%20all%203%20journals%20after%20save%20a%20PDF.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-219975%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Combine%203%20journals%20into%201%20journal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219975%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHere%20is%20an%20annotated%20script%20that%20should%20help%20you%20understand%20the%20issue%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0A%0A%2F%2F%20Open%20sample%20data%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2Fbig%20class.jmp%22%20)%3B%0A%0A%2F%2F%20Create%202%20journal%20windows%2C%20naming%20them%20what%20appears%20to%20be%20%22Journal_1%22%0A%2F%2F%20and%20%22Journal_2%22%0A%2F%2F%20Also%20assign%20the%20JSL%20variables%20j1%20and%20j2%20to%20the%20journals%0Aj1%20%3D%20New%20Window(%20%22Journal_1%22%2C%20%26lt%3B%3CJOURNAL%3E%3C%2FJOURNAL%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-219974%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Combine%203%20journals%20into%201%20journal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219974%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EI%20have%203%20individual%20journals%20and%20named%20as%20Journal_1%2C%20Journal_2%2C%20%26amp%3B%20Journal_3%20respectively.%20Each%20journal%20has%20Bar%20chart%2C%20pie%20char...etc.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-219973%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Combine%203%20journals%20into%201%20journal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219973%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EYou%20have%20quotes%20around%20%22journal_1%22.%26nbsp%3B%20In%20my%20script%2C%20I%20am%20assuming%20that%20Journal_1%20was%20a%20JSL%20variable%20pointing%20to%20the%20journal.%26nbsp%3B%20Is%20this%20not%20the%20case%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-219972%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Combine%203%20journals%20into%201%20journal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219972%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20don't%20know%20why%20the%20all%203%20journals%20still%20does%20not%20append%20to%20the%20final%20journal.%20This%20is%20the%20error%20from%20log.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ENot%20a%20display%20in%20access%20or%20evaluation%20of%20'append'%20%2C%20append(%20%22Journal_1%22%20)%20%2F*%23%23%23*%2F%3C%2FP%3E%3CP%3EIn%20the%20following%20script%2C%20error%20marked%20by%20%2F*%23%23%23*%2F%3CBR%20%2F%3Enw%20%3D%20New%20Window(%20%22final%22%2C%20%26lt%3B%3CJOURNAL%3E%3C%2FJOURNAL%3Enw%20%26lt%3B%26lt%3B%20append(%20%22Journal_1%22%20)%20%2F*%23%23%23*%2F%3B%3CBR%20%2F%3Enw%20%26lt%3B%26lt%3B%20append(%20%22Journal_2%22%20)%3B%3CBR%20%2F%3Enw%20%26lt%3B%26lt%3B%20append(%20%22Journal_3%22%20)%3B%3CBR%20%2F%3Enw%20%26lt%3B%26lt%3B%20Save%20PDF(%20%22%24TEMP%2Fexample.pdf%22%20)%3B%3CBR%20%2F%3EOpen(%20%22%24TEMP%2Fexample.pdf%22%20)%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-219959%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Combine%203%20journals%20into%201%20journal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219959%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ETo%20accomplish%20what%20you%20are%20looking%20for%2C%20is%20to%20simply%20Append()%20the%20journals%20together.%26nbsp%3B%20The%20example%20below%20creates%20a%20new%20journal%20window%2C%20appends%20the%203%20journals%20together%2C%20and%20then%20saves%20it%20as%20a%20PDF.%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3Enw%3Dnew%20window(%22final%22%2C%26lt%3B%3CJOURNAL%3E%3C%2FJOURNAL%3E%3CBR%20%2F%3E%3C%2FFONT%3Enw%26lt%3B%3CAPPEND%3E%3C%2FAPPEND%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EDocumentation%20on%20working%20with%20journals%20is%20covered%20in%20the%20Scripting%20Guide%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%20Help%3D%3D%26gt%3BBooks%3D%3D%26gt%3BScripting%20Guide%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
bsl
bsl
Level II

Combine 3 journals into 1 journal

Hi,

I would like to combine 3 journals file into 1, and save the final journal in PDF format.

 

Journal_1 = Journal:G_Si_Wafer_Table

Journal_2 = Journal:G_Si_Wafer_Mapping

Journal_3 = Journal:G_Si_Wafer_Reject_Pareto

 

How to combine 3 Journals into 1, how to save as PDF, and how to close all 3 journals after save a PDF.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Combine 3 journals into 1 journal

Here is an annotated script that should help you understand the issue

Names Default To Here( 1 );

// Open sample data
dt = Open( "$SAMPLE_DATA/big class.jmp" );

// Create 2 journal windows, naming them what appears to be "Journal_1"
// and "Journal_2"
// Also assign the JSL variables j1 and j2 to the journals
j1 = New Window( "Journal_1", <<journal, dt << bivariate( x( :weight ), y( :height ) ) );

j2 = New Window( "Journal_2", <<journal, dt << oneway( x( :sex ), y( :weight ) ) );

// Create an empty journal window to move the other journals into
jFinal = New Window( "Final", <<journal );

// There are 2 methods below that can be used to append the journals to the 
// final journal
// ^Journal pointer final^ << append( ^Journal pointer Journal_1^);
// jFinal << append( j1 );
// or
// window("final journal window name") << append( window("journal 1 window name"));
// window("Journal: Final") << append( window( "Journal: Journal_1"))

jFinal << append( j1 );

Window( "Journal: Final" ) << append( Window( "Journal: Journal_2" ) );

// The real name of the journal window is the key.  Even though the code gives the name of
// the journal windows as "Journal_1", "Journal_2" and "Final", that is not the actual name.
// "Journal: Journal_1" etc. is the name.  However, if one explictly assigns a name to
// journal, such as
//  j1 << set window title( "Journal_1" );
// the window's name will be "Journal_1"

jFinal2 = New Window( "Final 2" );
jFinal2 << set window title( "Final 2" );
j1 << set window title( "Journal_1" );
j2 << set window title( "Journal_2" );

Window( "Final 2" ) << append( Window( "Journal_1" ) );
Window( "Final 2" ) << append( Window( "Journal_2" ) );
Jim

View solution in original post

5 REPLIES 5
txnelson
Super User

Re: Combine 3 journals into 1 journal

To accomplish what you are looking for, is to simply Append() the journals together.  The example below creates a new journal window, appends the 3 journals together, and then saves it as a PDF.

nw=new window("final",<<journal);

nw<<append(Journal_1); nw<<append(Journal_2); nw<<append(Journal_3); nw << Save PDF( "$TEMP/example.pdf" ); open("$TEMP/example.pdf");

Documentation on working with journals is covered in the Scripting Guide

     Help==>Books==>Scripting Guide

Jim
bsl
bsl
Level II

Re: Combine 3 journals into 1 journal

Hi,

I don't know why the all 3 journals still does not append to the final journal. This is the error from log.

 


Not a display in access or evaluation of 'append' , append( "Journal_1" ) /*###*/

In the following script, error marked by /*###*/
nw = New Window( "final", <<journal );
nw << append( "Journal_1" ) /*###*/;
nw << append( "Journal_2" );
nw << append( "Journal_3" );
nw << Save PDF( "$TEMP/example.pdf" );
Open( "$TEMP/example.pdf" );

txnelson
Super User

Re: Combine 3 journals into 1 journal

You have quotes around "journal_1".  In my script, I am assuming that Journal_1 was a JSL variable pointing to the journal.  Is this not the case?

Jim
bsl
bsl
Level II

Re: Combine 3 journals into 1 journal

I have 3 individual journals and named as Journal_1, Journal_2, & Journal_3 respectively. Each journal has Bar chart, pie char...etc.

txnelson
Super User

Re: Combine 3 journals into 1 journal

Here is an annotated script that should help you understand the issue

Names Default To Here( 1 );

// Open sample data
dt = Open( "$SAMPLE_DATA/big class.jmp" );

// Create 2 journal windows, naming them what appears to be "Journal_1"
// and "Journal_2"
// Also assign the JSL variables j1 and j2 to the journals
j1 = New Window( "Journal_1", <<journal, dt << bivariate( x( :weight ), y( :height ) ) );

j2 = New Window( "Journal_2", <<journal, dt << oneway( x( :sex ), y( :weight ) ) );

// Create an empty journal window to move the other journals into
jFinal = New Window( "Final", <<journal );

// There are 2 methods below that can be used to append the journals to the 
// final journal
// ^Journal pointer final^ << append( ^Journal pointer Journal_1^);
// jFinal << append( j1 );
// or
// window("final journal window name") << append( window("journal 1 window name"));
// window("Journal: Final") << append( window( "Journal: Journal_1"))

jFinal << append( j1 );

Window( "Journal: Final" ) << append( Window( "Journal: Journal_2" ) );

// The real name of the journal window is the key.  Even though the code gives the name of
// the journal windows as "Journal_1", "Journal_2" and "Final", that is not the actual name.
// "Journal: Journal_1" etc. is the name.  However, if one explictly assigns a name to
// journal, such as
//  j1 << set window title( "Journal_1" );
// the window's name will be "Journal_1"

jFinal2 = New Window( "Final 2" );
jFinal2 << set window title( "Final 2" );
j1 << set window title( "Journal_1" );
j2 << set window title( "Journal_2" );

Window( "Final 2" ) << append( Window( "Journal_1" ) );
Window( "Final 2" ) << append( Window( "Journal_2" ) );
Jim

Recommended Articles