Re: Request for testing of Reltive File status
- From: "William M. Klein" <wmklein@xxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 16 May 2009 13:13:02 -0500
Has anyone been able to run this test yet? I haven't gotten any answers on-list
or off-list.
I am particularly interested in what results come from CURRENT versions of
- IBM Enterprise COBOL
- IBM ILE COBOL (or whatever the iSeries compiler is called now)
- Micro Focus (with and without .NET)
- Alchemy (formerly Fujitsu)
--
Bill Klein
wmklein <at> ix.netcom.com
"William M. Klein" <wmklein@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:GJ_Ol.55293$iW4.23123@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I may have asked for this a while ago, but I am trying to find out what as many
compilers/run-times do with this program as possible. I am particularly
interested in which compilers do NOT return a FS=24 when you try and write a
relative record with a key of zero. As I recall, some compilers yield other 2x
values.
You can respond on the list or to me privately. (As far as I can guess, I
don't think that compiler directives/options should make a difference,
however, if you want to try various options, please do so). This will probably
NOT work with pre-85 Standard compilers - not only is it "mixed case" but I
don't think they supported variable length relative files.
Depending on your environment, you will probably have to modify the "ASSIGN
TO" clause and *may* need to "pre-allocate" the relative file.
Sample code follows:
Identification Division.
Program-Id. relfs.
Environment Division.
Input-Output Section.
File-Control.
Select RelFile Assign RelName
Access Dynamic
Organization Relative
Status Rel-FS
Relative Key RelKey .
Data Division.
File Section.
FD RelFile
Record Varying in Size
From 1 to 999
Depending on RelLen.
01 RelRec.
05 RR-Elem occurs 1 to 999 times
Depending on RelLen
Pic X(01).
Working-Storage Section.
01 RF-Stuff.
05 RelName Pic X(08) Value "relftest".
05 Rel-FS Pic X(02).
88 RFS-OK Value "00".
88 RFS-24 Value "24".
05 RelKey Pic 9(03).
05 RelLen Pic 9(03).
Procedure Division.
Mainline.
Perform Create-File
Stop Run
.
Create-File.
Open Output RelFile
If RFS-OK
Move Zero to RelKey
Move 123 to RelLen
Move all "x" to RelRec
Write RelRec
Invalid Key
If RFS-24
Display "Test Passes, FS=24"
Else
Display "Invalid FS:" Rel-FS
End-If
End-Write
Close RelFile
Else
Display "Bad FS on OPEN:" Rel-FS
End-IF
.
--
Bill Klein
wmklein <at> ix.netcom.com
.
- Follow-Ups:
- Re: Request for testing of Reltive File status
- From: riplin
- Re: Request for testing of Reltive File status
- References:
- Request for testing of Reltive File status
- From: William M. Klein
- Request for testing of Reltive File status
- Prev by Date: Macbook Upgrade Core 2
- Next by Date: Re: Request for testing of Reltive File status
- Previous by thread: Request for testing of Reltive File status
- Next by thread: Re: Request for testing of Reltive File status
- Index(es):
Relevant Pages
|