How to achieve COBOL inspect functionality in Easytrieve



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

How to achieve COBOL inspect functionality in Easytrieve

Postby Jagan » Tue Oct 27, 2009 8:33 pm

Hi All,
I need to get the functionality below.. help me as am new to this EZV...

I/p file:
num name Dept desc
10 ABC A0 - Printing
12 XYZ A1 - Selling
15 ABZ B2 - Packing
25 CFE C3 - Cutting
..................
.............
................


The input file will be as shown above.. i want to generate output as below,

O/p file

name Deptnum
ABC A0
XYZ A1
ABZ B2
CFE C3
......
......
......


Help me in getting the above functionality of unstring a string delimited by show character.

Thanks in advance

Jagan....
Jagan
 
Posts: 1
Joined: Tue Oct 27, 2009 7:39 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to achieve COBOL inspect functionality in Easytrieve

Postby dick scherrer » Wed Oct 28, 2009 12:09 am

Hello,

To do this in Easytrieve, define the "input" data area as an array of 1-byte items. Then loop thru the input and do whatever is needed for your requirements.

As the loop proceeds thru the input, move the "unstrung" data to fields that are of the needed "picture".

If all of the data positions are fixed (like the posted example data) there is no need to "unstring". A simple redefinition would work.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post