Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

What does this variable declaration mean?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Mayil

New User


Joined: 19 Dec 2005
Posts: 14

PostPosted: Fri May 25, 2007 2:31 pm    Post subject: What does this variable declaration mean?
Reply with quote

I saw a declaration in a copybook as below.

:FMVQ:-ERROR-MSG
PIC X(01)BX(03)BX(56).

What data type is this exactly, how many bytes will it take?
Back to top
View user's profile Send private message

muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Fri May 25, 2007 2:57 pm    Post subject: Re: What does this variable declaration mean?
Reply with quote

In the copybook it is declared as :FMVQ: -

In the program it can be replaced.If repalcing is used, it will be like(for example 2 files are of same layout and use the same copy book in a program,then it will be declared as )

Code:
file1
COPY <copybook name> REPLACING ==:FMVQ:== BY ==PREV==.

file2
COPY <copybook name> REPLACING ==:FMVQ:== BY ==NEXT==.


Quote:
:FMVQ:-ERROR-MSG PIC X(01)BX(03)BX(56).


In program, file 1 will be used as PREV-ERROR-MSG and file 2 will be used as NEXT-ERROR-MSG

If the option of replace is not specified ,it will be taken as FMVQ.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri May 25, 2007 4:08 pm    Post subject: Re: What does this variable declaration mean?
Reply with quote

Mayil wrote:
:FMVQ:-ERROR-MSG PIC X(01)BX(03)BX(56).
What data type is this exactly, how many bytes will it take?

It is a 62 byte alphanumeric recieving field for a 60 byte sending field.
It forces blank or space between the first and second character and the fourth and fifth character.
Back to top
View user's profile Send private message
Mayil

New User


Joined: 19 Dec 2005
Posts: 14

PostPosted: Fri May 25, 2007 5:17 pm    Post subject: Re: What does this variable declaration mean?
Reply with quote

Thanks a lot William for the explantion. I was actually displaying the length of the variable and it displayed it as 62, was really confused. Your explanation clears my doubts.

Muthuvel, thanks for the effort. Actually i was confused regarding the data type only.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us