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

fetch particular fields from a report


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

Active User


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

PostPosted: Sun Aug 21, 2005 3:31 pm
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 Developer


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

PostPosted: Sun Aug 21, 2005 9:08 pm
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: 435
Location: chennai, India

PostPosted: Mon Aug 22, 2005 9:33 am
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: 435
Location: chennai, India

PostPosted: Mon Aug 22, 2005 10:39 am
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: 435
Location: chennai, India

PostPosted: Mon Aug 22, 2005 11:02 am
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 Developer


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

PostPosted: Mon Aug 22, 2005 8:34 pm
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: 435
Location: chennai, India

PostPosted: Tue Aug 23, 2005 9:12 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts To fetch records that has Ttamp value... DFSORT/ICETOOL 4
No new posts Fetch data from programs execute (dat... DB2 3
No new posts Need help on formatting a report DFSORT/ICETOOL 14
No new posts Creating Report using SORT DFSORT/ICETOOL 7
No new posts Code Multi Row fetch in PL1 program PL/I & Assembler 1
Search our Forums:

Back to Top