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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Way so that we can convert Sum fields into 9(11)v9(02)
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 Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Jul 17, 2006 8:27 pm    Post subject:
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    Post subject: Re: Regarding Sum Fields
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 Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Jul 17, 2006 9:06 pm    Post subject:
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    Post subject: Re: Regarding Sum Fields
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 Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Jul 18, 2006 8:57 pm    Post subject:
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    Post subject: Re: Regarding Sum Fields
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


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