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
 

 

What changes to be made in below card?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Ankita Maheshwari

New User


Joined: 12 May 2010
Posts: 24
Location: Pune

PostPosted: Thu May 27, 2010 4:10 pm    Post subject: What changes to be made in below card?
Reply with quote

Hi All,

Currently i am using this sort card to get the count of a file in trailer:

SORT FIELDS=COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(1,31,COUNT=(M11,LENGTH=9))

The output i am getting throught this is:

TRAILER 01-DEC-11 06-JAN-10000000450

There are two problems:

1) I want to get a space between the seond date which is 06-JAN-10 and the count 000000450.

2) When in the sort card i use COUNT=(M11,LENGTH=9), it is giving me +1 of the record count, for example: if the record count is 499, it gives 450. And if i use COUNT-1=(M11,LENGTH=9), it is giving me -1 of the record count, for example: if the record count is 499 it gives me 498.

Please Help.

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

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu May 27, 2010 4:33 pm    Post subject:
Reply with quote

Ankita wrote:
1) I want to get a space between the seond date which is 06-JAN-10 and the count 000000450.

Below will add 1 space between two fields date and count.

Code:

SORT FIELDS=COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(1,31,X,COUNT=(M11,LENGTH=9))

Quote:

2) When in the sort card i use COUNT=(M11,LENGTH=9), it is giving me +1 of the record count, for example: if the record count is 499, it gives 450. And if i use COUNT-1=(M11,LENGTH=9), it is giving me -1 of the record count, for example: if the record count is 499 it gives me 498.

This I don't believe....Remember count will give count of all records including last record(here record with date etc in your case)....
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: Thu May 27, 2010 10:32 pm    Post subject:
Reply with quote

Quote:
2) When in the sort card i use COUNT=(M11,LENGTH=9), it is giving me +1 of the record count, for example: if the record count is 499, it gives 450. And if i use COUNT-1=(M11,LENGTH=9), it is giving me -1 of the record count, for example: if the record count is 499 it gives me 498.


Huh? COUNT will give you the count of the data records. The generated trailer record is NOT included in the count. If you have 499 input records, COUNT will give you 499 and COUNT-1 will give you 498.

If you need more help with this, show the //SYSOUT messages you received, and explain what it is you actually want for the count (number of data records, number of data records + 1, or what?).
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 Sort Card to Remove Duplicate records... raj4neo SYNCSORT 2 Wed Jan 25, 2017 4:44 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
This topic is locked: you cannot edit posts or make replies. Sort card to replace text using cross... Susanta SYNCSORT 32 Tue Sep 13, 2016 4:17 pm
No new posts Creating a dynamic sort card in JCL u... ChitraChhabra DFSORT/ICETOOL 4 Wed Aug 03, 2016 6:15 pm
No new posts Performing addition using JCL sort card Shaheen Shaik DFSORT/ICETOOL 14 Fri May 06, 2016 12:25 pm


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