Operating System - OpenVMS
1748018 Members
3510 Online
108757 Solutions
New Discussion юеВ

FAC, record operation not permitted by specified file

 
Mark Vitalis
Occasional Advisor

FAC, record operation not permitted by specified file

Hi guys,
Im try to run a program from a command procedure and having a problem providing input in the following ways:

eg1
$DEFINE/USER_MODE SYS$INPUT DATA.TXT
$RUN PROGRAM
$EXIT


eg2
$RUN PROGRAM
1
HELLO
D
F
$EXIT

When i run the command procedure using both methods im getting a Fac,record operation not permitted by specified file.

I looked up the error in the vms systems messages and recovery procedures reference manual (http://www.sysworks.com.au/disk$cddoc04mar21/decw$book/d32vaa95.p127.decw$book)

and is said if the error occurred during execution of an image, verify that the FAC parameter in the FAB indicates the requested type of access

Also it states that If the error occurred during use of the DCL commands,verify that the correct qualifier is specified when the DCL command OPEN is entered to open the file.

Greatly in need of some assistance.

Sincerely,
Mark Vitalis
9 REPLIES 9
Ian Miller.
Honored Contributor

Re: FAC, record operation not permitted by specified file

is the program trying to write or perform a $FIND RMS operation?
____________________
Purely Personal Opinion
Hein van den Heuvel
Honored Contributor

Re: FAC, record operation not permitted by specified file

>> I looked up the error in the vms systems messages

You can also use $HELP/MESS/FAC=RMS FAC
It's the 3rd one down, as the string FAC has many matches. WHich is why i also gave the explcit facitily

It is probably BROKEN CODE which use SYS$INPUT to do output on. That works for a terminal, but not for a file.

Code inspection recommend.

System call trace may be helpfull, but probably overkill

Regards,
Hein van den Heuvel
HvdH Performance Consulting


Mark Vitalis
Occasional Advisor

Re: FAC, record operation not permitted by specified file

Basically what the program does is generate a report which is a .rep file of transactions based input data.

How do yuo go about verifing the file access control parameter in the fab indicating the requested type of access?
Hein van den Heuvel
Honored Contributor

Re: FAC, record operation not permitted by specified file

So the main output goes to a specific file
(.rep). That's good to know.
Is there any other output besides the report?
Maybe as sime as 'nnn records processed.'

May we assume the program works nicely when allowed to prompt for input?

More specifically... did it 'prompt'? SMG?
What is the exact mechanisme used for the prompt? What language? What system services?

When the input is coming from a file, where do you suggest the prompt should go to?

>> How do yuo go about verifing the file access control parameter in the fab indicating the requested type of access?

It's best to study what the program does.

For some (few) language you can intercept the RMS calls and display the fab from there.

If you can run interactively, then wait until the last promtt. Now with an other session and big privs (CMKRNL) use ANAL/SYSTEM... SET PROC ... SHOW PROC /CHAN ... SHOW PROC/RMS=FAB


Hein.



Mark Vitalis
Occasional Advisor

Re: FAC, record operation not permitted by specified file

This report is the only output. It works
nicely when input is from the terminal to

the point that i am able to enter input for the various prompts, however I haven├в t run the entire program from the command procedure using terminal input.

When input is from the file the entire process in aborted...and there is a new version of the input file with the first line of input in the form similar to:

12:59_tnd User id>
Mark Vitalis
Occasional Advisor

Re: FAC, record operation not permitted by specified file

Also the program is written in FORTRAN

EdgarZamora_1
Respected Contributor

Re: FAC, record operation not permitted by specified file

Maybe your fortran code is using the same unit for reading and writing?
Hein van den Heuvel
Honored Contributor

Re: FAC, record operation not permitted by specified file

>>> Also the program is written in FORTRAN

Ok... now look at the unit number for the terminal IO.

It is using the same (5?) for input and output?
It should use 2 unit/channels.


Did you try the ANAL/RMS ... SHOW PROC/RMS thing?
That should confirm all this.

Hein.
Mark Vitalis
Occasional Advisor

Re: FAC, record operation not permitted by specified file

Hein, i haven't, and i can't at the moment because im running a DCL lite version...but do they go on the command line or within the procedure?

I know for sure that 5 is the unit/channel for the input, i can't say for the output, i'll have to check.