Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Will the variable POS in the following code have a value of
2 or not?

01 POS PIC S9(4) COMP VALUE 2.
01 FIRST-NAME PIC X(10) VALUE 'ABC'.
01 LAST-NAME PIC X(10) VALUE 'XYZ'.
01 NAME PIC X(20) VALUE SPACES.

STRING FIRST-NAME DELIMITED BY SPACES
' ' DELIMITED BY SIZE
LAST-NAME DELIMITED BY SPACES
INTO NAME
WITH POINTER POS

Answer Posted / shobhit garg

No, It wont have value 2. rather value of POS will be 9.

Pointer specifies the number of non blank characters moved
to the receiveing string ( in our case its NAME).

So FIRST-NAME will return 3 bytes then a space then LAST-
NAME will return 3 bytes means overall 7 bytes.

Since our POS varibale starts from 2 , so overall count for
POS will be 2 + 7 = 9

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

For rewrite, why is it mandatory that file needs to be opened?

1088


how do you reference the variable block file formats from cobol programs

1226


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

1990


What are literals?

1113


i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

2568


I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?

1629


How are the next sentence and continue different from each other?

1278


Describe the cobol database components?

1160


If you are current on the owner of a set, what is the difference between obtain next and obtain first?

1322


how do you define single dimensional array and multidimensional array in your cobol?

1077


How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

3212


which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad

1488


What is the difference between a binary search and a sequential search what are the pertinent cobol?

1131


how to convert the recors form vsam file to db2 table tru file aid

3244


Name the divisions, which are available in a cobol program?

1216