force a new "section" in spv files

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

force a new "section" in spv files

Maguin, Eugene

In the spv file syntax and comments flow into “blocks” or “sections”. The output from procedure ends a block. (Although and for reasons unknown to me, sometimes but always after editing the output, a new block gets created by subsequent text. My question is how do I force creation of a new block. Consider:

 

Syntax

Blah-blah, etc

Save outfile …

 

 

*****.

Get file ….

Bloop-bloop, etc

Frequencies.

 

To my eyes, a natural block break is/could be between the Save … and ****. Particularly if I need to restart at the ****.

I don’t particularly see anything useful in the output editor.  I don’t give a damm about adding a title or anything else in the Insert dropdown. Is this a case of shut-up and get to work or is there something?

 

Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: force a new "section" in spv files

Jon Peck
Hi Gene,

I'm not sure exactly what you are looking for here, but here are several possibilities.

Use OUTPUT NEW or OUTPUT ACTIVATE to create a new Viewer window or switch to a different Viewer window when you want to switch.  (See also OUTPUT SAVE and OUTPUT CLOSE.)

Insert a page break either manually via the Viewer Insert menu or using the SPSSINC MODIFY OUTPUT extension command, e.g.
SPSSINC MODIFY OUTPUT TITLES 
/IF PROCESS=PRECEDING
/PAGEBREAKS BREAKBEFORETITLES=YES.

Use the TEXT extension command to insert a pagebreak with  or without some text.  E.g.,
TEXT /OUTLINE PAGEBREAK=YES.
or
TEXT "This is section IV run )CURDATE" /OUTLINE PAGEBREAK=YES.

Use scripting apis to do something more elaborate.




On Wed, Mar 20, 2019 at 1:21 PM Maguin, Eugene <[hidden email]> wrote:

In the spv file syntax and comments flow into “blocks” or “sections”. The output from procedure ends a block. (Although and for reasons unknown to me, sometimes but always after editing the output, a new block gets created by subsequent text. My question is how do I force creation of a new block. Consider:

 

Syntax

Blah-blah, etc

Save outfile …

 

 

*****.

Get file ….

Bloop-bloop, etc

Frequencies.

 

To my eyes, a natural block break is/could be between the Save … and ****. Particularly if I need to restart at the ****.

I don’t particularly see anything useful in the output editor.  I don’t give a damm about adding a title or anything else in the Insert dropdown. Is this a case of shut-up and get to work or is there something?

 

Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: force a new "section" in spv files

Maguin, Eugene

So maybe this is impossible but here is an example. Normally, the output for this is either appended to the current block, if there was not a procedure command just prior to the first line or starts a new block if there was a procedure command. (I know there is a list command but let’s skip over that.) What I’m after, for example, is a way to force the current block to end/close after the first print command executes. Insert --> new text does that but it’s set up to do just what it says—type in some text. Not ideal, but I can use this.

 

But, I notice that upon deleting that (blank) new text block, the output file pointer leaps backward to, in this case, the last print command block. That’s startling!

 

 

do if ($casenum ge 1 and $casenum le 12).

print / $casenum evqid local_date timestamp timestamp.dt /

   $casenum evqid local_date timelastcig timelastcig.dt.

end if.

execute.

 

*  use local_date for day computations.

*  extract date part of local date,

*  subtract from statusclinic4d to get daystoTQD.

compute emadate=xdate.date(local_date).

format emadate(adate10).

compute #emadate=emadate.

format #emadate(datetime20).

 

do if ($casenum ge 1 and $casenum le 5).

print / $casenum evqid local_date emadate #emadate.

end if.

execute.

 

 

 

 

 

 

 

From: Jon Peck <[hidden email]>
Sent: Wednesday, March 20, 2019 9:26 PM
To: Maguin, Eugene <[hidden email]>
Cc: SPSS List <[hidden email]>
Subject: Re: [SPSSX-L] force a new "section" in spv files

 

Hi Gene,

 

I'm not sure exactly what you are looking for here, but here are several possibilities.

 

Use OUTPUT NEW or OUTPUT ACTIVATE to create a new Viewer window or switch to a different Viewer window when you want to switch.  (See also OUTPUT SAVE and OUTPUT CLOSE.)

 

Insert a page break either manually via the Viewer Insert menu or using the SPSSINC MODIFY OUTPUT extension command, e.g.

SPSSINC MODIFY OUTPUT TITLES 

/IF PROCESS=PRECEDING

/PAGEBREAKS BREAKBEFORETITLES=YES.

 

Use the TEXT extension command to insert a pagebreak with  or without some text.  E.g.,

TEXT /OUTLINE PAGEBREAK=YES.

or

TEXT "This is section IV run )CURDATE" /OUTLINE PAGEBREAK=YES.

 

Use scripting apis to do something more elaborate.

 

 

 

 

On Wed, Mar 20, 2019 at 1:21 PM Maguin, Eugene <[hidden email]> wrote:

In the spv file syntax and comments flow into “blocks” or “sections”. The output from procedure ends a block. (Although and for reasons unknown to me, sometimes but always after editing the output, a new block gets created by subsequent text. My question is how do I force creation of a new block. Consider:

 

Syntax

Blah-blah, etc

Save outfile …

 

 

*****.

Get file ….

Bloop-bloop, etc

Frequencies.

 

To my eyes, a natural block break is/could be between the Save … and ****. Particularly if I need to restart at the ****.

I don’t particularly see anything useful in the output editor.  I don’t give a damm about adding a title or anything else in the Insert dropdown. Is this a case of shut-up and get to work or is there something?

 

Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


 

--

Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: force a new "section" in spv files

Kirill Orlov
There exist TITLE and SUBTITLE commands in syntax, I remember. Could they be some help?


21.03.2019 17:49, Maguin, Eugene пишет:

So maybe this is impossible but here is an example. Normally, the output for this is either appended to the current block, if there was not a procedure command just prior to the first line or starts a new block if there was a procedure command. (I know there is a list command but let’s skip over that.) What I’m after, for example, is a way to force the current block to end/close after the first print command executes. Insert --> new text does that but it’s set up to do just what it says—type in some text. Not ideal, but I can use this.

 

But, I notice that upon deleting that (blank) new text block, the output file pointer leaps backward to, in this case, the last print command block. That’s startling!

 

 

do if ($casenum ge 1 and $casenum le 12).

print / $casenum evqid local_date timestamp timestamp.dt /

   $casenum evqid local_date timelastcig timelastcig.dt.

end if.

execute.

 

*  use local_date for day computations.

*  extract date part of local date,

*  subtract from statusclinic4d to get daystoTQD.

compute emadate=xdate.date(local_date).

format emadate(adate10).

compute #emadate=emadate.

format #emadate(datetime20).

 

do if ($casenum ge 1 and $casenum le 5).

print / $casenum evqid local_date emadate #emadate.

end if.

execute.



===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: force a new "section" in spv files

Maguin, Eugene

Yes, there does. They probably would do the same thing. I’m letting go of this.

 

From: Kirill Orlov <[hidden email]>
Sent: Thursday, March 21, 2019 11:04 AM
To: Maguin, Eugene <[hidden email]>; [hidden email]
Subject: Re: force a new "section" in spv files

 

There exist TITLE and SUBTITLE commands in syntax, I remember. Could they be some help?

21.03.2019 17:49, Maguin, Eugene пишет:

So maybe this is impossible but here is an example. Normally, the output for this is either appended to the current block, if there was not a procedure command just prior to the first line or starts a new block if there was a procedure command. (I know there is a list command but let’s skip over that.) What I’m after, for example, is a way to force the current block to end/close after the first print command executes. Insert --> new text does that but it’s set up to do just what it says—type in some text. Not ideal, but I can use this.

 

But, I notice that upon deleting that (blank) new text block, the output file pointer leaps backward to, in this case, the last print command block. That’s startling!

 

 

do if ($casenum ge 1 and $casenum le 12).

print / $casenum evqid local_date timestamp timestamp.dt /

   $casenum evqid local_date timelastcig timelastcig.dt.

end if.

execute.

 

*  use local_date for day computations.

*  extract date part of local date,

*  subtract from statusclinic4d to get daystoTQD.

compute emadate=xdate.date(local_date).

format emadate(adate10).

compute #emadate=emadate.

format #emadate(datetime20).

 

do if ($casenum ge 1 and $casenum le 5).

print / $casenum evqid local_date emadate #emadate.

end if.

execute.

 

 

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD