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
 
fetch particular fields from a report

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 436
Location: chennai, India

PostPosted: Sun Aug 21, 2005 3:31 pm    Post subject: fetch particular fields from a report
Reply with quote

I couldn't get the exact key for searching this in the forum.I did some search.but no luck.hence posting here.

I have a report like this

Code:

page :1                   IMAT report   
aaabbb                  ccccffff(regd the report)
costmth :20040505  week:12     dtl-n: 1134
field names a          b         c       d
data           123     46456   76    435
                  .           ...................
                  .           . ..............


and page 2 3 and so.

I just want to fetch costmth and week alone and put it in a ds.
I tried by using ICETOOL by removing the first 2 records and selecting the costmth and week with their respective positions.
Is there a way to directly fetch these 2 fields and its values by identifying with their positions alone.I haven't used SKIP.And i dont need dtl-n in the new dataset.
provide a sample step here using the utilty,if possible .
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: Sun Aug 21, 2005 9:08 pm    Post subject:
Reply with quote

It's not at all clear to me what you're trying to do. I can't tell from what you said what it is you're trying to do with ICETOOL, or what you mean by "I haven't used SKIP". SKIP is an OUTFIL parameter that has nothing to do with what you're trying to do as far as I can tell. A clearer explanation and showing the expected output would have helped.

If the input records look as you've shown and you just want the date value and week value in an output record, then this DFSORT job will do it:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *                     
  OPTION COPY                           
* get costmth record.
  INCLUDE COND=(1,7,CH,EQ,C'costmth')   
* extract date and week
  OUTREC FIELDS=(10,8,25,2)         
/*     


SORTOUT will have:

2004050512

If that's not what you want, then you need to explain more clearly exactly what it is you're trying to do.
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 436
Location: chennai, India

PostPosted: Mon Aug 22, 2005 9:33 am    Post subject:
Reply with quote

Its correct to have 2004050512.
But my output file should look like the one shown below.
costmth :20040505 week:12.it should be directly fetched from the file.
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 436
Location: chennai, India

PostPosted: Mon Aug 22, 2005 10:39 am    Post subject: Re: fetch particular fields from a report
Reply with quote

I need cstmth and week only from the third record of the file.I want to omit the proceding cstmth and week in the same file.As I had mentioned page 1,2,3 and so....In each and every pagebreak cstmth exists.It should not fetch the second cstmth.It should fetch the first existence alone of cstmth and week.iam trying to do it in a single step.
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 436
Location: chennai, India

PostPosted: Mon Aug 22, 2005 11:02 am    Post subject:
Reply with quote

I got it now.I used STOPAFT=1

Thanks Frank.
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: Mon Aug 22, 2005 8:34 pm    Post subject:
Reply with quote

radhakrishnan v ,

I'm glad you figured it out. I would have told you immediately to use STOPAFT=1 if I'd known you only wanted the record from the first page, but you didn't say that. Please try to post your requirements more clearly in the future.
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 436
Location: chennai, India

PostPosted: Tue Aug 23, 2005 9:12 am    Post subject: Re: fetch particular fields from a report
Reply with quote

sure,Frank.
Thanks for all good responses.
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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am

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