View previous topic :: View next topic
|
Author |
Message |
anish.ibm
New User
Joined: 28 Jun 2007 Posts: 23 Location: Bangalore
|
|
|
|
Hi All,
Is it possible to USE DIVIDE in DFSORT by any number instead of predefined D,M,C etc.
Please let me know.
Thanks
Anish. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use DIV (for divide) in BUILD or OVERLAY with DFSORT. For example:
Code: |
INREC BUILD=(11:11,8,ZD,DIV,+20,TO=ZD,LENGTH=8)
|
If you need more specific help, you'll need to supply more details about what you're trying to do. |
|
Back to top |
|
|
anish.ibm
New User
Joined: 28 Jun 2007 Posts: 23 Location: Bangalore
|
|
|
|
Hi Frank,
Thx for the Info. I have
Code: |
ABC: 4523223
A : 2432300
|
I need A/ABC and reformatted in this way as below
Code: |
ABC: 4523223
A : 2432300
C : 0.5377 |
Thanks
Anish. |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
anish.ibm
Hello anish, is that you have only 2 records in your i/p or more than that?
If so, show example as to how the i/p and o/p looks like?
i/p and o/p RECFM and LRECL? |
|
Back to top |
|
|
anish.ibm
New User
Joined: 28 Jun 2007 Posts: 23 Location: Bangalore
|
|
|
|
Hi Kris,
I have some set of records. But i need only for one set of record . That will do... i will enhance the solution.
Thanks,
Anish. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I have some set of records. But i need only for one set of record . That will do... i will enhance the solution. |
I would suggest a different solution for two records vs "some set of records". Please show an example that more closely matches what you're trying to do so I can offer a solution that will work for what you're actually doing. |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
Quote: |
I have some set of records. But i need only for one set of record . That will do... i will enhance the solution.
|
We would like to provide the enhanced solution,So please provide ample amount of example records that describe the i/p and o/p |
|
Back to top |
|
|
anish.ibm
New User
Joined: 28 Jun 2007 Posts: 23 Location: Bangalore
|
|
|
|
Hi Frank/Kris,
My requirement is below..
Input file
Code: |
Header record
23323 21 1232212 (23323/1232212)*100 <-- Need the result of this expression here in this 5 Byte area
21122 35 2122212 (21122/2122212)*100
..
..
Trailer record
|
Output file
Code: |
Header record
23323 21 1232212 01.89
21122 35 2122212 00.99
..
..
Trailer record
|
Thanks,
Anish. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use a DFSORT job like the following to do what you asked for:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
Header record
23323 21 1232212
21122 35 2122212
Trailer record
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=(1,6,CH,NE,C'Header',AND,
1,7,CH,NE,C'Trailer'),
OVERLAY=(18:(1,5,ZD,MUL,+10000),DIV,10,7,ZD,EDIT=(TT.TT)))
/*
|
|
|
Back to top |
|
|
|