Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Select fixed number of characters - Easytrieve

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
technut

New User


Joined: 27 Dec 2007
Posts: 73
Location: India

PostPosted: Fri Jan 23, 2009 10:38 am    Post subject: Select fixed number of characters - Easytrieve
Reply with quote

Hi All,

Is there any option available in Easytrieve to select fixed number of characters from a field. For eg, if I have the field defined like below..

FLD 1 80 A
WS-FLD W 20 A

Is there any option available wherein I could move only the last 20 charactes of FLD to WS-FLD..

Something like this in cobol, MOVE FLD(61:20) TO WS-FLD.. Something similar available in easytrieve..?
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jan 23, 2009 11:09 am    Post subject:
Reply with quote

Hello,

You could define the last 20 bytes of fld as a different name (i.e. fld-last-20).

I am not aware of reference modification in Easytrieve.
Back to top
View user's profile Send private message
technut

New User


Joined: 27 Dec 2007
Posts: 73
Location: India

PostPosted: Fri Jan 23, 2009 11:23 am    Post subject: Reply to: Select fixed number of characters - Easytrieve
Reply with quote

Yes.. that could be the only option then..

Dick - Do you know if we have an Unstring option in eztrieve..? I mean Unstring delimited by space, comma, special characters of that sort..

Thanks for your help as always!
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jan 23, 2009 11:29 am    Post subject:
Reply with quote

Hello,

The way i've seen this done is treat the string as an array of 1-byte entries and manually unstring the data by looping. If this were my requirement, i might consider calling a cobol subprogram to do the unstring. . . This might be quicker to develop and would surely perform better if there was a high volume of data to be unstrung.
Back to top
View user's profile Send private message
technut

New User


Joined: 27 Dec 2007
Posts: 73
Location: India

PostPosted: Fri Jan 23, 2009 11:47 am    Post subject: Reply to: Select fixed number of characters - Easytrieve
Reply with quote

That's a nice idea.... Yeah as you said cobol is much better in this case!
Thanks a lot..
Back to top
View user's profile Send private message
ameenansari

New User


Joined: 18 Sep 2006
Posts: 11
Location: chennai

PostPosted: Fri Jan 23, 2009 12:04 pm    Post subject:
Reply with quote

Technut,

Redifines concept in easytrieve will meet your requirement. Try the following

WS-FLD W 80 A
WS-FLD-FRST-60 FLD 60 A
WS-FLD-LAST-20 FLD +60 20 A

WS-FLD = FLD

DISPLAY WS-FLD-LAST-20
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jan 23, 2009 9:49 pm    Post subject:
Reply with quote

Hello,

Quote:
Redifines concept in easytrieve will meet your requirement.
Yes, that was the concept of the earlier suggestion.

Also, you might want to check the code posted - i believe it has a couple of typos. Once the typos are corrected, the code should also work without the WS-FLD-FRST-60. Easytrieve does not require the redefine be complete.
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts Binary to display characters Roy Ware SYNCSORT 3 Tue Sep 19, 2017 8:46 pm
No new posts Can we limit length in concatenation ... balaji81_k DB2 7 Tue Aug 22, 2017 2:50 am
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
No new posts Profile changed to NUMBER ON STD (fro... Martylin TSO/ISPF 1 Thu Aug 03, 2017 9:14 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us