Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DFSORT for signed numeric edit values

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Rupa.P.V
Warnings : 1

New User


Joined: 04 Jul 2006
Posts: 30

PostPosted: Tue Feb 27, 2007 10:54 am    Post subject: DFSORT for signed numeric edit values
Reply with quote

My input looks like this.

A 000033154-00000010000.00
A 000002340-00000030000.00
A 000001230 00000010000.00
A 000000345-00000005000.00

and output should be
A 000000345-00000035000.00

I tried but was not able to add considering the sign.
Please advise the logic using DFSORT for the above scnario.
Thanks in advance

With Regards
Rupa...
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Tue Feb 27, 2007 11:09 am    Post subject:
Reply with quote

Hi There,

Ur question is not clear.
Would u please explain it ?
How u got A 000000345-00000035000.00 ?
Back to top
View user's profile Send private message
Rupa.P.V
Warnings : 1

New User


Joined: 04 Jul 2006
Posts: 30

PostPosted: Tue Feb 27, 2007 11:20 am    Post subject:
Reply with quote

Actually i want to add third coulmn alone
Consider infile divided into 3 columns like this
A| 000033154|-00000010000.00
A| 000002340|-00000030000.00
A| 000001230| 00000010000.00
A| 000000345|-00000005000.00

Just for the readability i divided coulmns using "|".
I just want to add third coulm alone dont bother abt the 2 nd column.
When we add third cloumn we should get
A 000000345-00000035000.00

Hope i am clear now...
Please let me know if u can solve my problem...

Thanks in advance...

With Regards
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Tue Feb 27, 2007 11:44 am    Post subject:
Reply with quote

Hi Rupa,


Code:

SORT FIELDS=(1,1,CH,A)
OUTFIL REMOVECC,NODETAIL,
SECTIONS=(1,1,
TRAILER3=(1,10,
11:TOT=(11,15,SFF,EDIT=(STTTTTTTTTTT.TT),SIGNS=(,-))))


I have not checked it . Let us know the result
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: Tue Feb 27, 2007 10:01 pm    Post subject:
Reply with quote

Rupa,

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
A 000033154-00000010000.00
A 000002340-00000030000.00
A 000001230 00000010000.00
A 000000345-00000005000.00
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  OUTFIL REMOVECC,NODETAIL,
    TRAILER1=(1,11,
      TOT=(12,15,SFF,EDIT=(STTTTTTTTTTT.TT),SIGNS=(,-)))
/*


For complete details on DFSORT's SFF format, see:

www.ibm.com/servers/storage/support/software/sort/mvs/pdug/
Back to top
View user's profile Send private message
Rupa.P.V
Warnings : 1

New User


Joined: 04 Jul 2006
Posts: 30

PostPosted: Tue Mar 20, 2007 10:48 am    Post subject:
Reply with quote

Sorry to get back very late.

when i tried the above code it is showing error in SFF keyword with error code U0223.
Please advise on how to proceed.

Thanks in advance.
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: Tue Mar 20, 2007 8:18 pm    Post subject:
Reply with quote

The ICE0223A message tells me that your site is way behind in DFSORT service. SFF requires DFSORT's Dec, 2004 PTF which you apparently don't have. Ask your System Programmer to install z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006). That will get you all of the available DFSORT function.
Back to top
View user's profile Send private message
Rupa.P.V
Warnings : 1

New User


Joined: 04 Jul 2006
Posts: 30

PostPosted: Mon Mar 26, 2007 12:55 pm    Post subject: Re: DFSORT for signed numeric edit values
Reply with quote

Is there any other way we can do this task.
Please let me know.
Thanks in advance.






With Regards
Rupa
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 Mar 26, 2007 8:45 pm    Post subject:
Reply with quote

Does every record always have the same value in position 1 (e.g. all of the records have A as in your example, or all of the records have some other value)? What is the RECFM and LRECL of the input file?
Back to top
View user's profile Send private message
Rupa.P.V
Warnings : 1

New User


Joined: 04 Jul 2006
Posts: 30

PostPosted: Tue Mar 27, 2007 9:14 am    Post subject: Re: DFSORT for signed numeric edit values
Reply with quote

Does every record always have the same value in position 1
(e.g. all of the records have A as in your example, or all of the records have some other value)?


No it varies from A to D ... I mean it can have A or B or C or D..
So i need to sum the third coulmn based on 1 st position value.

What is the RECFM and LRECL of the input file?

RECFM=FB & LRECL=080

With Regards
Rupa.
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: Tue Mar 27, 2007 8:36 pm    Post subject:
Reply with quote

Without the Dec, 2004 PTF functions, that would require splitting the file into two files with OUTFIL INCLUDEs - one for the positive values and the other for the negative values, so you could remove the decimal point and convert each value to a positive or negative ZD value. Then you could bring the two files back together, get the totals for each key, and convert the values back to the form you want. You really should ask your System Programmer to install the April, 2006 PTF.
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 Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Mass comment and edit elixir1986 IBM Tools 3 Thu Mar 02, 2017 10:09 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us