Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

-READ cannot locate file 1

Status
Not open for further replies.

kaeserea

Programmer
Feb 26, 2003
164
DE
Hi!

I'd like to read the first record of a sequential file under MVS and write the values of the field each into a variable. I tried it with -READ. Yet I get the FOC339 error which says that WebFocus connot locate the file.

Here is my code:
[tt]
DYNAM ALLOC FILE STANDDAT -
DATASET XYZ.AG3300.PROD.STANDDAT -
SHR REUSE

-READ STANDAT &JAHR.A4.&MONAT.A2.
[/tt]

The allocation of the file is fine when I say
[tt]
TABLE FILE STANDDAT
PRINT *
END
[/tt]
after the DYNAM ALLOC statement.

But why does the -READ command not find the file?

If it is of any help, here's the master file description for STANDDAT:
[tt]
FILENAME=STANDDAT,SUFFIX=FIX
SEGNAME=STANDDAT,SEGTYPE=S0,$
FIELDNAME=JAHR ,ALIAS=JAHR ,
USAGE=A004 ,ACTUAL=A004 ,
DESC='JAHR STAND DATEN ',$
FIELDNAME=MONAT ,ALIAS=MONAT ,
USAGE=A002 ,ACTUAL=A002 ,
DESC='MONAT STAND DATEN ',$
[/tt]

Greetings,
Eva
 
Put a -RUN betwwen the DYNAM command and the -READ

-RUN executes whats in the stack, in this case the DYNAM command
 
Yes, the -RUN is required, but if you notice the -READ refers to STANDAT instead of STANDDAT. (unless that was a type).
 
The -READ as written may work, but I would prefer:

-READ STANDAT &JAHR.A4. &MONAT.A2.

with a blank space before &MONAT.
 
Hi!

Thanxs for all your help! The STANDDAT is indeed a typo. But the blank was very useful! Without it the program didn't give me the second variable. So I reckon the blank is needed.

Eva
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top