1828356 Members
3051 Online
109976 Solutions
New Discussion

SETTING FIX LENGTHS

 
Ian M_1
Occasional Contributor

SETTING FIX LENGTHS

I have a problem and i would if anyone can help me. When I type in 'exchange copy dtf_save:b001057.dat;/record_format=fixed=680 ian:' i recieve the following error: fixed record length of 680 is too large. Is there anyway else of fix lengthing this file. I need it to be 680 bytes. Thanks, Ian
8 REPLIES 8
Steven Schweda
Honored Contributor

Re: SETTING FIX LENGTHS

The complete actual error message might be helpful.
Ian Miller.
Honored Contributor

Re: SETTING FIX LENGTHS

could you change the file format before copying by using covert or change the file attributes using SET FILE /ATTR=LRL=680
?
____________________
Purely Personal Opinion
Ian M_1
Occasional Contributor

Re: SETTING FIX LENGTHS

The full error message is

%EXCHANGE-I-NOTVALLEN, fixed record length of 680 is too large
%EXCHANGE-I-NOTCOPIED, file B001057.DAT;230 not copied to IAN:

Cheers,
Ian
Hein van den Heuvel
Honored Contributor

Re: SETTING FIX LENGTHS


Why are you using exchange? It may be the right tool, but then you should be able to explain to us why.

If you have a good reason to use EXCHANGE then you may need to use the /TRANSFER_MODE to make it do the rigth thing.

What does the input look like? no recognizable records? Is it 'dense' data? Any allignment between records? sizes?

Can you make the input look good by just declaring the file SET FILE/ATTR=(RFM=FIX, LRL=680, MRS=680, RAT=CR), then use copy?

Can you just use CONVERT/FDL/TRUN/PAD

hth,
Hein.
Ian M_1
Occasional Contributor

Re: SETTING FIX LENGTHS

I'm sorry to be a pain, but i'm fairly new to this. How would i use the command for the file it want to fix format?

Thanks,
Ian
Willem Grooters
Honored Contributor

Re: SETTING FIX LENGTHS

On the prompt, just type the command Hein supplied and hit enter.
In "our" jargon:

$ SET FILE/ATTR=(RFM=FIX, LRL=680, MRS=680, RAT=CR) dtf_save:b001057.dat

$ = standard DCL prompt, just the location where to enter your commands.

I can advise to use the HELP command, and read through the user guide and DCL manual, to start with :-)

Willem
Willem Grooters
OpenVMS Developer & System Manager
Hein van den Heuvel
Honored Contributor

Re: SETTING FIX LENGTHS

What he said!

SET FILE/ATTR did not officialy exist (there always was fileset), when excahnge was crafted.

But before doing so please spend a little time trying to understand the input file format better.
Start with a DIR/FULL (report here?)
You probably also want to report the individual attributes you are likely to change with SET FILE.
$rat = F$FILE(myfile,"RAT")
$mrs = F$FILE(myfile,"MRS")
:
LRL, RFM,


You probably want to DUMP/BLOCK=COUNT=3 'myfile.
This will give you a visual check as to the contents of the input stream.

If you want to share that dump with us, ten do not just include it, but attach it and other pertinent information as a text file to a future reply.

Hein.
Jan van den Ende
Honored Contributor

Re: SETTING FIX LENGTHS

Ian,

review the first question by Hein:

(And believe me, Hein is THE world expert in file structures details!)

Do you really NEED EXCHANGE?

If so, Why?

If we know that, we might also be able to use other means to get the desired result!

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.