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
 
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 Linkage editor is part of COBOL, z/OS... ankit.jain COBOL Programming 5 Fri Apr 20, 2018 4:17 pm
No new posts CICS RETRIEVE pshongal CICS 2 Thu Mar 08, 2018 9:15 am
No new posts Copying part of the report using SARBCH Aedulla CA Products 1 Tue Oct 24, 2017 9:24 am
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts RMM: scratching a volume that RMM thi... Hervey Martinez IBM Tools 0 Mon May 15, 2017 8:51 pm

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