Variable length variable 
Author Message
 Variable length variable

Quote:

>G'day,

>I'm not sure what you call this technique, but it allows me to move/display

variable length variable.

Quote:

>eg

>77  Start-posi  pic 99 value 01.
>77  var-length  pic 99 value 06.

>77 test-var    pic x(80) value "My pink elephant".

>DISPLAY test-var(start-posi : var-length)

>output >> My pink

>I like to know is this facility is available in newer compilers ?

The technique is called "reference modification".  It was introduced via the
'85 ANSI Standard and is available in all ANSI'85 conforming compilers.

--
+ +
+   Bill Klein -
         "C" is a nice letter to START the name of your programming language
with
      but I wouldn't want to end up there.



Tue, 26 Sep 2000 03:00:00 GMT  
 Variable length variable

G'day,

I'm not sure what you call this technique, but it allows me to move/display variable length variable.

eg

77  Start-posi  pic 99 value 01.
77  var-length  pic 99 value 06.

77 test-var    pic x(80) value "My pink elephant".

DISPLAY test-var(start-posi : var-length)

output >> My pink

I like to know is this facility is available in newer compilers ?



Wed, 27 Sep 2000 03:00:00 GMT  
 Variable length variable

IBM calls it "Refernce Modification". The rest of us call it a
substring.

mickey

Quote:

> G'day,

> I'm not sure what you call this technique, but it allows me to move/display variable length variable.

> eg

> 77  Start-posi  pic 99 value 01.
> 77  var-length  pic 99 value 06.

> 77 test-var    pic x(80) value "My pink elephant".

> DISPLAY test-var(start-posi : var-length)

> output >> My pink

> I like to know is this facility is available in newer compilers ?



Wed, 27 Sep 2000 03:00:00 GMT  
 Variable length variable

Quote:

>IBM calls it "Refernce Modification". The rest of us call it a
>substring.

   The ANSI Standard for COBOL and all documentation that conforms to the
ANSI Standard calls it "reference modification". Those who are used to other
languages or tools call it whatever they are used to.

Quote:
>mickey


>> G'day,

>> I'm not sure what you call this technique, but it allows me to

move/display variable length variable.
Quote:

>> eg

>> 77  Start-posi  pic 99 value 01.
>> 77  var-length  pic 99 value 06.

>> 77 test-var    pic x(80) value "My pink elephant".

>> DISPLAY test-var(start-posi : var-length)

>> output >> My pink

>> I like to know is this facility is available in newer compilers ?



Wed, 27 Sep 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Processing variable length/variable data files

2. Char variable of variable length

3. NEED HELP appending two Char variables of variable length

4. Getting true length of a variable length record - IBM Mainframe

5. Finding Variable-Length Record Length

6. Class variables / global variables / Init variables

7. Length limit for variable names in your language?

8. Length limit for variable names in your language?

9. Variable length regular expression

10. Problem when formating a variable delimited file to fixed length

11. printf with variable length widths

12. Length limit for variable names in your language?

 

 
Powered by phpBB® Forum Software