Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 293463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:16:27+00:00 2026-05-12T06:16:27+00:00

I have a SAS file handle created as such: filename filehandle report.htm; I have

  • 0

I have a SAS file handle created as such:

filename filehandle "report.htm";

I have several files (packed Javascript files) which have very long lines (>32K in length). I would like a way to append their contents to the file above.

I know that if I do:

data _null_;
    file filehandle;
    put "very long string here";
run;

Sometimes, the very long string has line breaks inserted, which I don’t want since it could break the Javascript code.

Ideally, something like:

x "cat packed.js >> report.htm";

would work well but I only have the file handle, not the original file path.

What routines could help me accomplish the job efficiently? Is there some way to read the packed JS file and write them out using put, either line by line or character by character?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T06:16:27+00:00Added an answer on May 12, 2026 at 6:16 am

    You can retrieve the full path from the file handle using the pathname function then use the x command as you wanted to.

    For example:

    data _null_;
      filenm=pathname('filehandle');
      call symput('filenm',filenm);
    run;
    
    x "cat packed.js >> &filenm.";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have .MAP file which is created from SAS XML mapper. As the name
I have task involving reading SAS .xpt files using .NET. For that I'm using
I have an xml file for which I try do display some informations into
I usually have a sas macro code which automatically run macros Save As and
I have a button that's created via a NIB file. I've derived a class
I have several datasets that I would like to delete after my SAS procedure
I have the following code in an external JS file (ie: test.js); which creates
I have a form that posts to a url which triggers file download. The
We have a process here at work where an input file is created by
I have a lot of sas dataset files that starts with s followed by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.