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

Can we retrieve part of SYMNAME value?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ramanan-R

New User


Joined: 21 Mar 2007
Posts: 66
Location: Chennai, Tamilnadu, India

PostPosted: Tue Oct 23, 2007 7:38 pm
Reply with quote

Hi All,

Can we retrieve part of SYMNAME value?

I have an input file like below,

Code:

Ramanan,1234.5678


The SYMNAME dataset has
Name,1,10,CH
Value,3,9,CH

Is there any way to retrieve only first three characters of Name, i.e Ram and 1234.56 (truncate two decimal places) of Value alone to output dataset.

Please don't suggest relative position method, because my input dataset is 700 byte long and there are around 60 fields defined with SYMNAMES. My requirement is to retrieve part of data from certain columns (SYMNAMES).

Can we handle using ICETOOL?

Thanks in advance,
Ramanan R
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Tue Oct 23, 2007 7:54 pm
Reply with quote

Ramanan,

I dont understand your requirement clearly .. can you plz detail ur req ...
Back to top
View user's profile Send private message
Ramanan-R

New User


Joined: 21 Mar 2007
Posts: 66
Location: Chennai, Tamilnadu, India

PostPosted: Tue Oct 23, 2007 8:31 pm
Reply with quote

Hi Khamarutheen,

I have an input file with record as below

Code:

Ramanan   ,1234.5678


and SYMNAME dataset (with Symbols for fields) has below definition

Field name,Starting position,Length,Data type
Name,1,10,CH
Value,12,9

Now, i want output file with record as below,
Ram,1234.56

i.e i need a substring from Symbols Name and Value. Hope its clear.

Please let me know, if you need more info.

Thanks.

Regards,
Ramanan R
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Oct 23, 2007 9:34 pm
Reply with quote

There's no substring function per se. But you could use DFSORT's POSITION,symbol function to add the substring symbols you need. For example:

Code:

//SYMNAMES DD DSN=...  symbol data set
//  DD *               
POSITION,Name           
S_Name,=,3             
POSITION,Value         
S_Value,=,7             
/*                     


The resulting symbols would be:

Code:

Name,1,10,CH     
Value,12,9,CH   
S_Name,1,3       
S_Value,12,7     


Then you can use S_Name and S_Value in your control statements.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Using Java/C/C++ to retrieve dataset ... Java & MQSeries 6
No new posts Retrieve IMS SubSystem Name IMS DB/DC 2
No new posts retrieve volume records from decollec... DFSORT/ICETOOL 4
No new posts Unable to retrieve Datasets Names usi... CLIST & REXX 20
No new posts Retrieve multiple records with metaco... CA Products 0
Search our Forums:

Back to Top