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

What changes to be made in below card?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ankita Maheshwari

New User


Joined: 12 May 2010
Posts: 23
Location: Pune

PostPosted: Thu May 27, 2010 4:10 pm
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
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 Developer


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

PostPosted: Thu May 27, 2010 10:32 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
No new posts Need suggestion on a sort card DFSORT/ICETOOL 10
No new posts Want to mask Middle 8 Digits of Debit... COBOL Programming 3
No new posts JCL sort card for file creation condi... DFSORT/ICETOOL 4
Search our Forums:

Back to Top