IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What is The COBOL equivalent VARCHAR(130)


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mformainframe

New User


Joined: 29 Dec 2003
Posts: 1

PostPosted: Mon Dec 29, 2003 3:24 pm
Reply with quote

Hi everyone,
Can u please help me in this issue?
What is The COBOL equivalent VARCHAR(130) ?????
It was asked in the interview???

Thanx in advance...
mformainframe
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Dec 30, 2003 1:53 am
Reply with quote

Hi M,

You define it this way:
Code:

05 var-fld.
   49 vf-len      pic s9(004) comp.
   49 vf-text     pic  x(150).


If you are creating the field, you must move the TRUE length of the field to vf-len as well as moving the data to vf-text. To retreive the data use a reference modified MOVE using vf-len as the length modifier.

Since the ques you asked is rudimentary, I'd suggest you do some research before you use VARCHAR. There are some performance hits you can run into, as well as some processing peculiarities.

Regards, Jack.
Back to top
View user's profile Send private message
prabe

New User


Joined: 09 Mar 2007
Posts: 17
Location: kerala

PostPosted: Fri Mar 09, 2007 10:40 am
Reply with quote

Can U explain clearly why we use 05th group varible and 49th elementary varible.

can you explain , why Vf-textis 150?. can we use 130 there?
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Fri Mar 09, 2007 11:57 am
Reply with quote

prabe wrote:
Can U explain clearly why we use 05th group varible and 49th elementary varible.

can you explain , why Vf-textis 150?. can we use 130 there?


See the link below for the first question:
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/rzajp/rzajpequivsqlcobol.htm


For second question:
Yes! You can use 130.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top