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

Way so that we can convert Sum fields into 9(11)v9(02)


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Rupa.P.V
Warnings : 1

New User


Joined: 04 Jul 2006
Posts: 30

PostPosted: Mon Jul 17, 2006 3:38 pm
Reply with quote

I need the follwing..
I have a file say sample.file which has Quantity as one of its filed in the layout.
For Eg:

Filller PIC X(10).
Quantity PIC 9(11).9(02)
Filler PIC X(02).


here i want to add the quantity filed in the file.

Sum fields = (11,14,PD) will give error Because the quantity is numeric edited....
Is there any way so that we can convert that field into 9(11)v9(02)...Som that we use it for adding...

Please help me in doing this...
I need this very urgently.....
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 Jul 17, 2006 8:27 pm
Reply with quote

It's not clear what your PIC 9(11).9(02) value actually looks like in the input records. Please show an example of your input records and what you expect for output.
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 Jul 17, 2006 8:35 pm
Reply with quote

Input file is looks like this.

200702077,00000000025.00,M
200702087,00000000025.00,M
200703097,00000000025.00,M
200703107,00000000025.00,M
200703117,00000000025.00,M
200703127,00000000025.00,M


I want to add second column based on sort key .
I want to use sum fields.Since the second column has got period(.) i cannot add directly.

Please help me out..
If i am not clear with my question please let me....
Waiting for the response
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 Jul 17, 2006 9:06 pm
Reply with quote

You can use a DFSORT job like this to do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  INREC OVERLAY=(11:11,14,UFF,TO=ZD,LENGTH=14)
  SORT FIELDS=(...)
  SUM FIELDS=(11,14,ZD)
  OUTREC OVERLAY=(11:11,14,ZD,EDIT=(TTTTTTTTTTT.TT))
/*
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 Jul 18, 2006 10:44 am
Reply with quote

When i use the above utility.
Its giving me Jcl error saying "INVALID INREC OR OUTREC STATEMENT OPERAND"

Please help me...
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: Tue Jul 18, 2006 8:57 pm
Reply with quote

If the $ for that message is under the OVERLAY parameter, you don't have z/OS DFSORT PTF UQ95214 or DFSORT R14 PTF UQ95213 installed. These PTFs have been available since Dec, 2004 so your site is way behind on applying DFSORT service. Ask your System Programmer to install z/OS DFSORT PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006). That will get you up-to-date on all of the available DFSORT functions.

In the meantime, you can use this DFSORT job without the Dec, 2004 PTF:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  INREC FIELDS=(1,10,C'0',11,11,23,2,25,2)
  SORT FIELDS=(1,6,CH,A)
  SUM FIELDS=(11,14,ZD)
  OUTREC FIELDS=(1,10,11,14,ZD,EDIT=(TTTTTTTTTTT.TT),25,2)
/*
Back to top
View user's profile Send private message
Rupa.P.V
Warnings : 1

New User


Joined: 04 Jul 2006
Posts: 30

PostPosted: Wed Jul 19, 2006 10:10 am
Reply with quote

Thanks a lot ...
Its working....
Thanks for helping me....
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts Convert HEX to Numeric DB2 3
Search our Forums:

Back to Top