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
 

 

SYNCSORT Card for Summing occurs fields
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Fri Oct 19, 2007 7:17 pm    Post subject: SYNCSORT Card for Summing occurs fields
Reply with quote

HI all,

Can I write a sort card to make a sum for this recin format??

01 ENFP08S-REC.
05 ENFP08S-DETT OCCURS 100.
10 ENFP08S-SIGN PIC X(001) VALUE SPACE.
10 ENFP08S-IMPO PIC Z.ZZZ.ZZZ.ZZZ.ZZ9,99.
10 ENFP08S-PV-06 PIC X(001) VALUE SPACE.

Thanks a lot
Back to top
View user's profile Send private message

krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Fri Oct 19, 2007 7:47 pm    Post subject:
Reply with quote

miosne
Quote:
Can I write a sort card to make a sum for this recin format??
You may, but which field you want to sum and based on which field you want to sum(KEY).

Provide the sample i/p and o/p records.
With i/p and o/p file LRECL and RECFM
Back to top
View user's profile Send private message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Mon Oct 22, 2007 12:51 pm    Post subject:
Reply with quote

I want only make a SUM FIELDS on the ENFP08S-IMPO.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Mon Oct 22, 2007 3:12 pm    Post subject:
Reply with quote

miosne
As i asked before
Quote:
Provide the sample i/p and o/p records.
With i/p and o/p file LRECL and RECFM
Back to top
View user's profile Send private message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Mon Oct 22, 2007 3:16 pm    Post subject:
Reply with quote

sory, the key is ENFP08S-PV-06.

Thanks a lot
Back to top
View user's profile Send private message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Mon Oct 22, 2007 7:05 pm    Post subject: Reply to: SORT Card for Summing occurs fields
Reply with quote

I'll try to put al the infromations needs.

The sort key is ENFP08S-CAGNZ.
The file lenght is 2500.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Mon Oct 22, 2007 10:04 pm    Post subject:
Reply with quote

Quote:
The sort key is ENFP08S-CAGNZ.
in the initial file layout, you havent shown this variable at all icon_question.gif
Back to top
View user's profile Send private message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Tue Oct 23, 2007 12:46 pm    Post subject:
Reply with quote

no.
I've moved only a portion of the file.
:-(
Sorry
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Oct 23, 2007 1:12 pm    Post subject:
Reply with quote

Code:
01 ENFP08S-REC.
05 ENFP08S-DETT OCCURS 100.
10 ENFP08S-SIGN PIC X(001) VALUE SPACE.
10 ENFP08S-IMPO PIC Z.ZZZ.ZZZ.ZZZ.ZZ9,99.
10 ENFP08S-PV-06 PIC X(001) VALUE SPACE.

in this layout,
1. what is the SORT-KEY? and
2. Which field you want to SUM?
3. LRECL of the File?
4. REFCM of the file?
Back to top
View user's profile Send private message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Tue Oct 23, 2007 1:32 pm    Post subject:
Reply with quote

the sort key is enfp08s-pv-06
the field to sum is enfp08s-impo
the lrecl is 2500
the recfm is FB

thank you for your patience.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Oct 23, 2007 2:42 pm    Post subject:
Reply with quote

If your SORT KEY falls with in OCCURS, you will have 100 SORT KEY's icon_exclaim.gif
Are you sure about the Layout.

OR
Do you want to SUM
ENFP08S-IMPO(1) + ENFP08S-IMPO(2) + ENFP08S-IMPO(3) + .... +ENFP08S-IMPO(100) for each record?
Back to top
View user's profile Send private message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Tue Oct 23, 2007 2:51 pm    Post subject:
Reply with quote

the both situations are my problem!!!! icon_redface.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Oct 23, 2007 3:00 pm    Post subject: Reply to: SYNCSORT Card for Summing occurs fields
Reply with quote

To get useful answers there must be an agreement on terms

a file is composed of records,
for sorting purposes each record must have a key
( uniquely defined - with the key tokens in a fixed position )

What You call a key enfp08s-pv-06 looks like an index
and we are not even sure that all the entries will be filled,
so ( by sort terminology ) enfp08s-pv-06 does not qualify as a key

unless... You provided incomplete info..

naturally there is nothing wrong in asking on how to sum across columns,

but the terms must be clear
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Oct 23, 2007 3:02 pm    Post subject:
Reply with quote

Quote:
the both situations are my problem!!!!

Then do you want to sum ENFP08S-IMPO(1) + ENFP08S-IMPO(2) + ENFP08S-IMPO(3) + .... +ENFP08S-IMPO(100) for each record?

Example: IF i/p is
Code:

AAAAA 12.34 34.45 62.43
BBBBB 32.43 54.23 34.54

Do you expect the o/p to be
Code:

AAAAA 109.22
BBBBB 121.20
Back to top
View user's profile Send private message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Tue Oct 23, 2007 3:10 pm    Post subject:
Reply with quote

I want, if it's possible, to having this situation

occ-1 occ-2 occ-3 occ-100
AAAAA 12.34 34.45 62.43 .... 109.22
BBBBB 32.43 54.23 34.54 .... 121.20
.
.
.
total 44.77 88.68 96.97
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Oct 23, 2007 10:45 pm    Post subject:
Reply with quote

miosne
Since you havent given expected o/p and enough senarios, i have to ask some sample example and expected o/p
If the i/p has
Code:

AAAAA 12.34 AAAB 34.45 AAAD62.43
BBBBB 32.43 AAAC 54.23 AAAD34.54
AAA1A 12.34 AAAB 34.45 AAAD62.43
BBBBB 32.43 AA1C 54.23 3AAD34.54

What is your expected o/p, where (AAAA,BBBB,AAAB,AAAC.....) are your SORT keys?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Oct 23, 2007 11:40 pm    Post subject:
Reply with quote

Hi Krisprems,

If you revert back to Miosne's previous post and your previous post, notice that you created a horizontal sum - all of the values for the key.

What i believe is needed is a column (vertical) total for the fields.

If i've misunderstood, i'm sure i'll be informed icon_smile.gif
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed Oct 24, 2007 8:27 am    Post subject:
Reply with quote

Hi dick
Since the layout was an OCCURS of 100, i guessed the sum would be Horizontal. After Miosne's post, looks like its typical Vertical SUMMING.

But since the For each occurance there would be key, i wonder how would be the o/p is expected(as i have given my sample i/p in my previous post let me wait and watch for the expected o/p) icon_question.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Oct 24, 2007 8:39 am    Post subject:
Reply with quote

Hi Krisprems,

Quote:
let me wait and watch for the expected o/p
Yes, that would be good.

My current/newest guess is that both line totals and column totals are needed.

We'll see later today icon_smile.gif
Back to top
View user's profile Send private message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Wed Oct 24, 2007 12:48 pm    Post subject: Touchè
Reply with quote

I need line and column total. icon_biggrin.gif
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am


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