View previous topic :: View next topic
|
Author |
Message |
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
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 |
|
|
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
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 |
|
|
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
I got it now.I used STOPAFT=1
Thanks Frank. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
sure,Frank.
Thanks for all good responses. |
|
Back to top |
|
|
|