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

  • Home
  • SEARCH
  • 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 8732721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:29:19+00:00 2026-06-13T09:29:19+00:00

I want to write unformatted (binary) data to STDOUT in a Fortran 90 program.

  • 0

I want to write unformatted (binary) data to STDOUT in a Fortran 90 program. I am using AIX Unix and unfortunately it won’t let me open unit 6 as “unformatted”. I thought I would try and open /dev/stdout instead under a different unit number, but /dev/stdout does not exist in AIX (although this method worked under Linux).

Basically, I want to pipe my programs output directly into another program, thus avoiding having an intermediate file, a bit like gzip -c does. Is there some other way I can achieve this, considering the two problems I have encountered above?

  • 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-06-13T09:29:20+00:00Added an answer on June 13, 2026 at 9:29 am

    I would try to convert the data by TRANSFER() to a long character and print it with nonadvancing i/o. The problem will be your processors’ limit for the record length. If it is too short you will end up having an unexpected end of record sign somewhere. Also your processor may not write the unprintable characters the way you would like.

    i.e., something like

    character(len=max_length) :: buffer
    
    buffer = transfer(data,buffer)
    
    write(*,'(a)',advance='no') trim(buffer)
    

    The largest problem I see in the unprintable characters. See also A suprise with non-advancing I/O

    —EDIT—
    Another possibility, try to use file /proc/self/fd/1 or /dev/fd/1

    test:

    open(11,file='/proc/self/fd/1',access='stream',action='write')
    write(11) 11
    write(11) 1.1
    close(11)
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have Progress appservers (OE 10.0B05) running on AIX UNIX and I want write
I want write a simple query which will fetch data from a table (which
I want to write a program in Prolog that confirms if a b-tree of
I want to write a program to contact a PHP script online, and show
I want write a small program to get IP Address of some websites by
suppose we have two numbers i want write program which print common bits subsequent
I want write a program that when installed, runs in background and adds a
I want write an win-form application to convert data from foxpro table into sql
I want to write some radian angles to a binary file. Is there any
I am using spring 3.0 org.springframework.web.multipart.commons.CommonsMultipartFile for file uploading. i want write down unit

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.