Thread: concatenate with SETBB

Started: 2013-10-17 15:14:24
Last activity: 2013-10-17 18:34:24
Topics: SAC Help
Januka Attanayake
2013-10-17 15:14:24
Hi, 
I am trying to concatenate a couple of variables within a do loop as follows, 

DO FILE WILD *.BHZ.*.SAC
  READ $FILE

   SETBB INSNAME ' ( CONC SAC_PZs_ &1,KNETWK _ &1,KSTNM _BHZ_) '

ENDDO

This used to work in a previous version of SAC but not in the 101.6 version. Can someone please  point me to the correct syntax? I am on a MAC OS X (mountain lion).

Thanks !

Januka.

 
_______________
Serenity isn't freedom from the storm, but peace within the storm

Januka Attanayake
Postdoctoral Research Associate
Laboratório de Sismologia
Departamento de Física

Instituto Superior Técnico
Av. Rovisco Pais, 1

1049-001 Lisboa, Portugal 

University email: januka.attanayake<at>ist.utl.pt
Home page: http://sites.google.com/site/janukaattanayake/
  • Brian Savage
    2013-10-17 18:34:24
    Dear Januka,

    The style in which 101.6 handles strings is different from previous versions

    Try
    SAC> fg seismo
    SAC> ch kstnm CDV
    SAC> ch knetwk IU
    SAC> setbb insname 'SAC_PZ_&1,knetwk&_&1,kstnm&_BHZ_'
    SAC> getbb insname
    insname = 'SAC_PZ_IU_CDV_BHZ_'
    SAC>

    Brian

    On Oct 17, 2013, at 11:14 AM, Januka Attanayake wrote:

    Hi,
    I am trying to concatenate a couple of variables within a do loop as follows,

    DO FILE WILD *.BHZ.*.SAC
    READ $FILE

    SETBB INSNAME ' ( CONC SAC_PZs_ &1,KNETWK _ &1,KSTNM _BHZ_) '
    ENDDO

    This used to work in a previous version of SAC but not in the 101.6 version. Can someone please point me to the correct syntax? I am on a MAC OS X (mountain lion).

    Thanks !

    Januka.


    _______________
    Serenity isn't freedom from the storm, but peace within the storm
    Januka Attanayake
    Postdoctoral Research Associate
    Laboratório de Sismologia
    Departamento de Física
    Instituto Superior Técnico
    Av. Rovisco Pais, 1
    1049-001 Lisboa, Portugal

    University email: januka.attanayake<at>ist.utl.pt
    Home page: http://sites.google.com/site/janukaattanayake/





    _______________________________________________
    sac-help mailing list
    sac-help<at>iris.washington.edu
    http://www.iris.washington.edu/mailman/listinfo/sac-help


    • Januka Attanayake
      2013-10-17 15:47:18
      Thanks for pointing out correct syntax Brian! Works fine.

      Januka.
       
      _______________
      Serenity isn't freedom from the storm, but peace within the storm

      Januka Attanayake
      Postdoctoral Research Associate
      Laboratório de Sismologia
      Departamento de Física

      Instituto Superior Técnico
      Av. Rovisco Pais, 1

      1049-001 Lisboa, Portugal 

      University email: januka.attanayake<at>ist.utl.pt
      Home page: http://sites.google.com/site/janukaattanayake/








      On Thursday, October 17, 2013 4:34 PM, Brian Savage <savage<at>uri.edu> wrote:

      Dear Januka,

      The style in which 101.6 handles strings is different from previous versions

      Try
      SAC> fg seismo
      SAC> ch kstnm CDV
      SAC> ch knetwk IU
      SAC> setbb insname 'SAC_PZ_&1,knetwk&_&1,kstnm&_BHZ_'
      SAC> getbb insname
       insname = 'SAC_PZ_IU_CDV_BHZ_'
      SAC> 

      Brian


      On Oct 17, 2013, at 11:14 AM, Januka Attanayake wrote:

      Hi, 
      I am trying to concatenate a couple of variables within a do loop as follows, 


      DO FILE WILD *.BHZ.*.SAC
      READ $FILE


      SETBB INSNAME ' ( CONC SAC_PZs_ &1,KNETWK _ &1,KSTNM _BHZ_) '

      ENDDO


      This used to work in a previous version of SAC but not in the 101.6 version. Can someone please  point me to the correct syntax? I am on a MAC OS X (mountain lion).


      Thanks !


      Januka.



      _______________
      Serenity isn't freedom from the storm, but peace within the storm

      Januka Attanayake
      Postdoctoral Research Associate
      Laboratório de Sismologia
      Departamento de Física

      Instituto Superior Técnico
      Av. Rovisco Pais, 1

      1049-001 Lisboa, Portugal 


      University email: januka.attanayake<at>ist.utl.pt
      Home page: http://sites.google.com/site/janukaattanayake/





      _______________________________________________
      sac-help mailing list
      sac-help<at>iris.washington.edu
      http://www.iris.washington.edu/mailman/listinfo/sac-help

Page built 04:52:02 | v.b'59d0d2