MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FILE-STATUS

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
nadh
Intermediate


Joined: 08 Oct 2004
Posts: 192
Topics: 89

PostPosted: Thu Jun 26, 2008 6:41 am    Post subject: FILE-STATUS Reply with quote

Hi,

Can we declare FILE-STATUS as PIC 99? Why its is written in books as we have to declare it as PIC XX. Please clarify.

Cheers!!!
Nadh
Back to top
View user's profile Send private message Send e-mail
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Thu Jun 26, 2008 7:59 am    Post subject: Reply with quote

Yes. PIC 99 is covered by the second description.

Code:
The status key data item can be defined in the working-storage, local-storage,
or linkage sections as either of the following:
- A two-character alphanumeric item
- A two-character numeric data item, with explicit or implicit USAGE IS
DISPLAY. It is treated as an alphanumeric item.
Back to top
View user's profile Send private message
nadh
Intermediate


Joined: 08 Oct 2004
Posts: 192
Topics: 89

PostPosted: Thu Jul 03, 2008 5:40 am    Post subject: Reply with quote

HI,

Thankyou.

Since its declared as USAGE IS DISPLAY the PIC will be treated as alphanumeric. My doubt is I have never seen Alphabetic error codes in FILE-STATUS. Even then why it is declared as PIC xx.

Please give me the solution.

Cheers!!!
Nadh
Back to top
View user's profile Send private message Send e-mail
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu Jul 03, 2008 8:10 am    Post subject: Reply with quote

Nadh, as someone who's not a programmer, I don't always understand how you guys look at things from a logic standpoint.

If you have a value such as FILE-STATUS, which by definition is something you would never, ever, be performing calculations on, then it makes no logical sense to declare it as anything BUT alpha-numeric. To me, the same logic would hold true for other non-calculatable numeric values like account numbers or PIN numbers or ID numbers, etc.
Back to top
View user's profile Send private message
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Thu Jul 03, 2008 8:14 am    Post subject: Reply with quote

The manuals don't explain 'why'. They just tell you to use either PIC XX or PIC 99 to make it work. That's the convention. If you don't like the XX version, just use the 99 version.
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Thu Jul 03, 2008 3:12 pm    Post subject: Reply with quote

Currently, only numeric values populate the 2-character FILE-STATUS. Who knows what might happen in the future?
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Thu Jul 03, 2008 11:21 pm    Post subject: Reply with quote

Correction: That should be FILE STATUS not FILE-STATUS.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
nadh
Intermediate


Joined: 08 Oct 2004
Posts: 192
Topics: 89

PostPosted: Fri Jul 04, 2008 4:08 am    Post subject: Reply with quote

Hi,
Thankyou Terry.

I've got the below information for it.

The first character of the file-status-key is known as status-key-1; the second character is known as status-key-2.If status-key-1 is a nine (9) then status key 2 is "implementor-defined". Many vendors take advantage of the x"00' to x'FF' (or 0-255) binary value. Therefore, the file status key may not always be a numeric value.

Cheers!!!
Nadh
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group