View previous topic :: View next topic
|
Author |
Message |
Bhuvaneswari K
New User
Joined: 15 Sep 2008 Posts: 17 Location: Chennai
|
|
|
|
My requierment is:
Field1 Field2
12345 H
99999 H
12345 S
12345 H
87689 H
99999 H
The field 1 is numeric data type and the field 2 is character
My output should be:
12345 H 2
12345 S 1
87689 H 1
99999 H 2
Will the below statements do?
Code: |
//STEP1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//OUT DD SYSOUT = *
//TOOLIN DD *
OCCUR FROM(IN) LIST(OUT) BLANK -
HEADER('Number') ON(1,5,CH,A) -
HEADER('Flag') ON(7,1,CH) -
HEADER('Count') ON(VALCNT,N05)
/*
|
Please reply at the earliest
Regards
Bhuvana |
|
Back to top |
|
|
Bhuvaneswari K
New User
Joined: 15 Sep 2008 Posts: 17 Location: Chennai
|
|
|
|
Is it possible to use occur in icetool without header definitions?
I mean..
Code: |
OCCUR FROM(INPUT) LIST(OUTPUT) BLANK -
ON(1,5,CH) ON(7,1,CH) ON(VALCNT,N05)
|
Regards
Bhuvana |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
bhuvaneswari,
The following DFSORT JCL will give you the desired results
Code: |
//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
12345 H
99999 H
12345 S
12345 H
87689 H
99999 H
//OUT DD SYSOUT=*
//TOOLIN DD *
OCCUR FROM(IN) LIST(OUT) BLANK -
HEADER('NUMBER') ON(1,5,CH) -
HEADER('FLAG') ON(7,1,CH) -
HEADER('COUNT') ON(VALCNT,N05)
/*
|
|
|
Back to top |
|
|
Bhuvaneswari K
New User
Joined: 15 Sep 2008 Posts: 17 Location: Chennai
|
|
|
|
Thanks Kolusu..
Bhuvana |
|
Back to top |
|
|
Bhuvaneswari K
New User
Joined: 15 Sep 2008 Posts: 17 Location: Chennai
|
|
|
|
Is it possible to use occur in icetool without header definitions?
I mean..
Code: |
OCCUR FROM(INPUT) LIST(OUTPUT) BLANK -
ON(1,5,CH) ON(7,1,CH) ON(VALCNT,N05)
|
Regards
Bhuvana |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Is it possible to use occur in icetool without header definitions?
I mean..
OCCUR FROM(INPUT) LIST(OUTPUT) BLANK -
ON(1,5,CH) ON(7,1,CH) ON(VALCNT,N05)
|
Yes. That would give you default headers:
Code: |
(1,5,CH) (7,1,CH) VALUE COUNT
12345 H 2
12345 S 1
87689 H 1
99999 H 2
|
If you don't want any headers, you can specify the NOHEADER operand. That would give you:
Code: |
12345 H 2
12345 S 1
87689 H 1
99999 H 2
|
|
|
Back to top |
|
|
Bhuvaneswari K
New User
Joined: 15 Sep 2008 Posts: 17 Location: Chennai
|
|
|
|
thanks alot Frank
Bhuvana |
|
Back to top |
|
|
|