View previous topic :: View next topic
|
Author |
Message |
Raymond Sachs
New User
Joined: 13 Dec 2007 Posts: 45 Location: USA
|
|
|
|
Dear Listers,
We are a shop that uses SYNCSORT FOR Z/OS 1.3.2.1R
Is it possible to use JCL/SORT to achieve what I need?
Input file:
Code: |
****************************
XXX 8 2009-12-31 1234
XXX 5 2009-11-30 4567
XXX 8 2009-12-24 8901
XXX 2 2011-08-25 2345
XXX 8 2010-01-01 6789
****************************
|
Output has a Header Rec with timestamp and a Trailer Rec with Count
Code: |
*****************************
FILE NUMBER: 20120305061425
XXX 8 2009-12-31 1234
XXX 5 2009-11-30 4567
XXX 8 2009-12-24 8901
XXX 2 2011-08-25 2345
XXX 8 2010-01-01 6789
RECORD COUNT: 000005
****************************
|
|
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Yes. But not without a program. Fortunately SORT is a program.
Have you searched the forum for examples which may be use to you? |
|
Back to top |
|
|
Raymond Sachs
New User
Joined: 13 Dec 2007 Posts: 45 Location: USA
|
|
|
|
Hi Bill,
My solution involves a 2-3 Step process and then some
concatenating of files where I use EZACFSM1 and then
SORT FIELDS=COPY with TRAILER1 option.
I was looking for a better solution : ) |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Do you have a manual? If you look at the HEADER and TRAILER possibilities, and bear in mind that a "report" without a carriage-control and headings looks just like a file, you should be able to get it in one easy step.
I`m sure there are some examples. |
|
Back to top |
|
|
Raymond Sachs
New User
Joined: 13 Dec 2007 Posts: 45 Location: USA
|
|
|
|
I do not have a manual. Is there an online link ? Can I use EZACFSM1 in the HEADER option? |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Raymond Sachs wrote: |
I do not have a manual. Is there an online link ? Can I use EZACFSM1 in the HEADER option? |
IIRC, your site uses Syncsort, which does not make its documentation freely available to the general public. OTOH, it is free for the asking to licensed users; if your shop does not have manuals, ask for them. |
|
Back to top |
|
|
Raymond Sachs
New User
Joined: 13 Dec 2007 Posts: 45 Location: USA
|
|
|
|
Dear listers,
I still can not get the Header to work. I get the Trailer counts correctly by the following JCL. How can I get the Header with Timestamp.
Code: |
//STEP01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN='TEST.FILE1',DISP=SHR
//SORTOUT DD DSN='TEST.FILE2',DISP=OLD
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=('RECORD COUNT: ',COUNT=(M11,LENGTH=6))
/*
|
Required output for the Header
Code: |
FILE NUMBER: 20120305061425 |
|
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
Back to top |
|
|
Raymond Sachs
New User
Joined: 13 Dec 2007 Posts: 45 Location: USA
|
|
|
|
It helps except the Date comes out as CCYY-MM-DD. How can I get rid of the
'-' and just have it as CCYYMMDD |
|
Back to top |
|
|
Raymond Sachs
New User
Joined: 13 Dec 2007 Posts: 45 Location: USA
|
|
|
|
Got it to work ..using DATE=(4MD.)
Thanks for your support |
|
Back to top |
|
|
|