ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Create variable blocked file in AS/400

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Re: Create variable blocked file in AS/400

    I just created PF with single field of length with varlen. then I have copied this file using cpytoimpf . But still it is coming as fixed blocked size file.
    For example if first records ends in 10th position and second record ends in 15th position , then the cursor should move to 11th place for first record and 16th place for second record.
    In my case cursor points to the record length of the file
    The Secret Of Achieving Your Goals Is Revealed Before Your Eyes.
    System Engineer

    Sudha...

    Comment


    • #17
      Re: Create variable blocked file in AS/400

      I did try to explain to you that this was not simple because there is no such thing as a variable length record in the iBM i database system.

      Did you try telling it to trim trailing blanks?

      If that doesn't work then I suggest you look at the CSV writer Open Access handler I wrote. You can find it here: Creating an OA CSV Writer http://www.ibmsystemsmag.com/ibmi/de...s-Open-Access/

      You can trim the fields yourself. You could also use original files and let it split up the fields.

      Comment


      • #18
        Re: Create variable blocked file in AS/400

        I was listening to you Mr suit man in the big Hat.
        I'm here to chew bubble gum and kick @#%@#%@#%.....and I'm all outta bubble gum !
        Yes I'm talking to you squirrel nuts.

        Comment


        • #19
          Re: Create variable blocked file in AS/400

          Glad someone was - sadly you're not the OP ;-)

          Comment


          • #20
            Re: Create variable blocked file in AS/400

            Originally posted by JonBoy View Post
            Glad someone was - sadly you're not the OP ;-)
            He's not, but he's dating a woman named Olga who he's never met, and is apparently a Tanya Tucker fan. So there's that.

            I'm not sure how the OP is going to pull this off except by using a stream file and specifying the end of record delimiter (such new line or line feed, since I'm assuming that's how the "variable block" is working) I'm not exactly sure why that isnt the way to go, either. It's easy to do. A few minutes and its done.
            Michael Catalani
            IS Director, eCommerce & Web Development
            Acceptance Insurance Corporation
            www.AcceptanceInsurance.com
            www.ProvatoSys.com

            Comment

            Working...
            X