Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Can we retrieve part of SYMNAME value?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Can we retrieve part of SYMNAME value?
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: 680
Location: NJ

PostPosted: Tue Oct 23, 2007 7:54 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Tue Oct 23, 2007 9:34 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts RMM: scratching a volume that RMM thi... Hervey Martinez IBM Tools 0 Mon May 15, 2017 8:51 pm
No new posts Need to retrieve Julian_date Suganya87 DB2 4 Wed Aug 17, 2016 7:27 pm
No new posts Retrieve current year or month using ... vnktrrd DFSORT/ICETOOL 15 Tue Mar 15, 2016 4:14 pm
No new posts Why part promote/part demote should b... rohanthengal All Other Mainframe Topics 4 Fri Nov 27, 2015 3:32 pm
No new posts retrieve line commands from the data ... Pedro TSO/ISPF 6 Sat Oct 17, 2015 5:41 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us