Truncate long variable into a short one

Hi,
I have a 40 character variable that needs to be truncated in a 20 character variable.
How do I do this?
Thanks,
John

data:   var1(40) type c.
data:   var2(20) type c.
if u want first 20 chars of var1 to be moved to var2..
then simply use...  var2 = var1.  " First 20 chars will be moved to var2 from var1
If u want last 20 chars then
var2 = var1+20(20).
if u want 20 chars of specific position like  pos 10 to 30.. then
var2 = var1+10(20).
Reward if helpful
Regards
Prax

Similar Messages

  • How do I split a long video into many short ones automatically

    I want to split a 3.5 minute video into 210 small clips automatically. I certainly don't want to do that manually. is there a way to do this?

    yunabesaid
    The Scene Detect in the media area is gone by Premiere Elements 9.0/9.0.1. But, you can right click the video's thumbnail in Organize/Media, select Run AutoAnalyzer which claims to be "detecting scenes". The latter is worth a try to see what it will do with your 3.5 min clip and its scenes.
    Regarding the quality of your videos in Premiere Elements 9.0/9.0.1 editing and export, we would need lots more information on that
    a. properties of the source media (video and audio compression, frame size, frame rate, interlaced or progressive, file extension, pixel aspect ratio).
    b. what project preset you are setting for the project so that the project preset matches the properties of the source media
    c. types of edits
    d. choice of export and export settings, customized or default settings used
    e. computer or TV DVD or Blu-ray player.
    Please review, supply the requested information, and then we will plan troubleshooting strategy. Also, we would need some idea of your computer environment - Windows or Mac 32 or 64 bit version...
    Lots ot put together.
    Looking forward to your follow up.
    Thank you.
    ATR

  • Is there a way to make a long clip into a short clip without compressing it any further?

    Is there a way to make a long clip into a short clip without compressing it any further?
    I went through all my old formats (VHS, hi8, miniDV, etc) and captured them. They end up as .mov files. Some of the longer 2hr ones are about 28GB.
    If I am making a new project and I want to edit in short clips from several of these longer files, is there a way to save a short clip from an existing file without compressing it any further?
    In other words, lets say I have 10 2hr files, but I know I only want 1 minute from each. Is there a way to select the good 1 minute from each .mov file that I want to use and a version of this 1 minute from each in the folder I am working on the project in, without compressing them??? I like to keep all of the content I am working with on a project in its own folder in case the project needs to be moved from one hard drive to the next while I am working on it. I would hate to have to make a folder that is 280GB or more when I only need a minute from each larger file.
    I hope I have asked this in a way that is understandable. Maybe there is a term for what I want to do, that I don't know yet that has its own help section too.   Thanks for any assistance

    Thanks Jon - That's kind of where I started, but the part of that I need help with on is the second to last step.
    "Export using a codec that matches the source material. "
    The codec they were captured in is .mov at DV quality, but then after picking .mov, there are so many other options to choose from as far as compression goes from sound quality and settings, to how many passes, etc. I just want the new clip to be of the same quality as the original clip. It looks so complicated and its not clear to me what options to pick to match the original.
    Is there a setting or preference that helps you to match the compression settings of the original clip? Or is there  a way to detect the settings of the original clip so I can repeat that in the shortened clip??

  • How can I divide one big long track into several smaller ones?

    I have many mp3"s I imported or downloaded in my Library of lectures, sermons and speeches.
    How can I divide one big long track into several smaller ones?
    Any input would be great.

    lakergrl wrote:
    How do I split one very long track into several tracks (audio journal split into each day)
    http://www.bulletsandbones.com/GB/GBFAQ.html#exportsections
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • Breaking long movies into more than one DVD

    Help! I've created a movie with a bunch of chapters of a training that we did and now I need to burn it on a DVD but its way too big...how can I break it up into two or three dvds with idvd?

    What is "...way too big..."? How long is the movie? I assume you're using iMovie HD (6). You should make movies that will then fit iDVD. Do you have a double-layer burner in the iMac?

  • Conversion of NUMC variable into a  CHAR one

    I have come accross an issue wherein i need to change the NUMC value into a CHAR value. Kindly let me know whether there is any function module for this purpose.
    <removed_by_moderator>
    Edited by: Julius Bussche on Dec 31, 2008 10:09 AM

    what is the problem??????????/
    data: var(10) type n.
    data: var1(10) type c.
    var = '0123456789'.
    var1 = var.
    this type of conversions will done , so what is your case???????/
    Regards,
    Arjun.

  • Playing a long comp into a shorter comp

    I want to play a full 15sec composition that is in a 3sec composition duplicated multiple times.
    In Comp1 : 15sec    are    BLOCK 3sec duplicated 5 times  (fozen 2 times at 1st frame)
    in every BLOCK 3sec   is a   STAR 15sec composition.
    When I play Comp1, the STAR composition stops after 3 seconds (when the BLOCK stops too).
    I want the STAR composition to play full 15second. Meaning STARs curentFrame must be = Comp1 currentFrame regardless of which BLOCK 3sec is playing.
    I attached an example. (.aep CS6):  www.razor3ds.com/ftp/test.aep
    Here is the video: http://youtu.be/MWBJLf-nVJQ
    Note that this is a simplified version of whan I am currently working on, so STAR 15sec must stay within BLOCK 3sec.
    (BLOCK is a mobile phone and STAR is the phones screen)
    I am sure the solution is easy. Just an expresion to STAR 15sec to play in paralel with Comp1 or something. But I can't find anything and don't really know what keywords to search to be honest.
    Thanks

    So I figured out a way around this by duplicating the BLOCK layers and editing parts of STAR in each of them.
    Not the practical solution that I was expecting but didn't find a working expression (like    this.time=comp("Comp1").time)
    Here is the new source:www.razor3ds.com/ftp/test2.aep
    Here is the new video:http://youtu.be/7uqUCiNdmVc

  • How do I split a single event with many clips into multiples events, one event per date?

    I archived the video from my AVCHD camera into a Final Cut video archive. Later I imported this into iMovie. All the clips from this archive (spanning several months) are dumped into a single event. If I recall, older versions of iMovie would import video into separate events for each day. Then I would go through and give each event a meaningful name (e.g., "Mary's Birthday").
    This is what I would like. Is there a way to split this very long event into multiple events, one for each day that is present in the event?

    Not automatically but with imovie 10 you can create new events with any name you like then move clips into them from other events  (Just like FCP 10.1).   See:
    http://help.apple.com/imovie/mac/10.0/#mov1d890f00b
    You can also choose to display clips in an event grouped by date.
    Geoff

  • How to pass a variable into a cfc?

    prior to calling the cfinvoke, I have coding that determins a
    variable "X"
    I need to pass X into a cfc so it can complete the query held
    there.
    So I tried
    <cfinvoke component="A"
    method="AList"
    returnvariable="AResults">
    <cfinvokeargument name="x" value="#X#"
    /></cfinvoke>
    correct so far?
    Now over on the cfc page is where I'm getting stuck
    Inside my cffunction I'm adding <cfargument name="X" />
    But how do I get the value in?

    I don't quite understand your question. Can you rephrase?
    But before all that, bear in mind that one doesn't pass a
    variables into a
    *CFC*, one passes it into a function within the CFC. And as
    with all
    functions, one passes values into the function by passing it
    as an
    argument. But - of course - the function has to be coded to
    expect the
    argument.
    Your own sample code demonstrates this in action:
    <cfinvokeargument name="abbrCode"
    value="#companyAbbrCode#" />
    (NB: lose the trailing slash: this is CFML, not XML).
    So you know how to do that.
    Hence me not quite understanding what you're actually asking.
    Adam

  • (Another) problem with long variables

    I just got an error message that I really didn't expect.
    �Operator '&' can not be applied to 'long'�
    errrr, help?... Could anyone please tell me if there is another way of doing this (other than writing a function that splits each long variable into two int variables, masks them with '&' and reassembles them back into a long variable)

    I just got an error message that I really didn't
    expect.
    �Operator '&' can not be applied to 'long'�
    errrr, help?... Could anyone please tell me if
    there is another way of doing this (other than writing
    a function that splits each long variable into two int
    variables, masks them with '&' and reassembles them
    back into a long variable)Have you considered class BigInteger

  • Select LONG column into CLOB variable

    Hi all,
    I am trying retrieve the data present in a LONG column into a CLOB variable.
    However I am getting an error, pls let me know how I can resolve it.
    DECLARE
    v_text CLOB;
    BEGIN
    SELECT TO_LOB(trigger_body)
    INTO v_text
    FROM
    user_triggers
    WHERE
    ROWNUM <= 1;
    END;
    ERROR at line 8:
    ORA-06550: line 8, column 20:
    PL/SQL: ORA-00932: inconsistent datatypes: expected NUMBER got LONG
    ORA-06550: line 8, column 5:
    PL/SQL: SQL Statement ignored
    Let me know if there is an alternate to this. I would like to get the data present in the LONG column into a variable.
    The reason why I am not retrieving the LONG column into LONG variable is stated below (from Oracle Website):
    You can insert any LONG value into a LONG database column because the maximum width of a LONG column is 2**31 bytes.
    However, you cannot retrieve a value longer than 32760 bytes from a LONG column into a LONG variable.
    Thanks and Regards,
    Somu

    There are couple of things I did (listed in order):
    1) Create Global Temporary Table containing a CLOB column
    2) Select LONG column and convert to CLOB by using TO_LOB and insert into Global Temporary Table containing a CLOB column
    2) Select from this Global Temporary Table (which already contains data in CLOB) and assign it to a CLOB variable.
    This is done because you can not directly use TO_LOB in a select statement to assign the value to a CLOB variable.
    Stated below is an example:
    -- Create Temporary Table
    CREATE GLOBAL TEMPORARY TABLE glb_tmp_table_lob(
    time TIMESTAMP WITH LOCAL TIME ZONE,
    text CLOB
    ON COMMIT DELETE ROWS;
    -- PL/SQL Block to Execute
    DECLARE
    v_clob CLOB;
    BEGIN
    -- Insert into Temporary Table by converting LONG into CLOB
    INSERT INTO glb_tmp_table_lob (
    time ,
    text
    SELECT
    sysdate ,
    TO_LOB(dv.text)
    FROM
    dba_views dv
    WHERE
    ROWNUM <= 1
    -- Select from the Temporary table into the variable
    SELECT
    gt.text
    INTO
    v_clob
    FROM
    glb_tmp_table_lob gt;
    COMMIT;
    -- Now you can use the CLOB variable as per your needs.
    END;
    /

  • Sony DCR-HC32 miniDV cam importing into iMovie as one long clip?!?

    I just picked up a great deal on a Sony DCR-HC32. The biggest problem that I'm having is that it imports the video into iMovie as one long, continuous clip. With my other camera, a Canon ZR70mc, when I shoot and import the video it's as individual clips. The Sony makes it one long clip and then how does one edit a movie? I'm puzzled. Hopefully this isn't just a glaring problem with the camera, but a setting that I can fix! Any help you can offer would be great!
    Thanks!
    Tim.

    This is not retro-active: it won't fix any clips you've already shot
    In some Sony video cameras (including my Hi8 analogue one) you can timecode the tape even after you have shot the footage, without in any way disturbing the footage, as the timecode and date information is contained on a seperate track on the tape.
    As regards our rediculous revertion to GMT, when our timezone should in any case be the same as the rest of Europe, I can tell you that all my videos shot between November and March are out by one hour, and have been for years!

  • How can long lines of code be cut / separated into multiple short

    In Java, How can long lines of code be cut / separated into multiple short lines?
    Example
    System.out.printf( "%d\t%d\t%s\t%s\t%s\t%s\t\t%s\n", arrayIndex ,  part[ arrayIndex ], name[arrayIndex], units[arrayIndex], price[arrayIndex], units[arrayIndex] * price[arrayIndex], total[ arrayIndex ]   );Thanks

    System.out.printf( "%d\t%d\t%s\t%s\t%s\t%s\t\t%s\n",
    arrayIndex , 
    part[ arrayIndex ],
    name[arrayIndex],
    units[arrayIndex],
    price[arrayIndex],
    units[arrayIndex] * price[arrayIndex],
    total[ arrayIndex ]   );P.S. It looks to me like you have an array for each attribute of something. This is not OO and you should consider creating a class holding the information about each 'Part' or whatever it is. You will then just need a collection of Parts.

  • How do you make one long track into multiple tracks?

    How do you make one long track in itunes into multiple tracks? Is there a way to do that?

    I found another solution too through Garageband. I don't know if it was easier, but I liked this way of creating seperate tracks.
    First, You put the long track into Garageband.
    -then you create a New Basic Track under Track Tab-create as many of those as tracks you want to make
    -also make sure the headphones button is lit up under each New Basic Track-this allows it to be a 'solo' track.
    -then you can start cutting music-with the long strip find where you want to split into a new track and drag that half down into each New Basic Track.
    -Once you are done, press Option Z and a purple little triangle will appear up by the measures. drag the triangle to the end of the first track-this allows it when sharing to itunes to just record the particular track you want, it puts a stop/end to that track.
    -then, make sure the track you want to share is highlighted the bright orange and go to share, 'send to itunes'
    -it will send that to itunes and you can rename it in itunes.
    -Go back to Garageband-delete the first track you successfully shared and move the next one up to where that one was. Slide it accross to the left so it is at the beginning, press option Z and move the purple triangle where you want it to be...and you are good to repeat until all your tracks are done!
    I am a very visual person, and this helped to see where I was cutting each track, just another way!

  • ALV grid - how to break a long string into several lines?

    I have a ALV grid, where one of the fields contains a textstring that is typically 100 characters long.
    Is it possible to break this long string into shorter strings on multiple rows?
    Kind of like in Excel, when using row break...

    Thats not possible in ALV

Maybe you are looking for