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

JCL to help achieve without a program


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

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Mon Mar 05, 2012 10:40 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Mar 05, 2012 10:51 pm
Reply with quote

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
View user's profile Send private message
Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Mon Mar 05, 2012 10:58 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Mar 05, 2012 11:01 pm
Reply with quote

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
View user's profile Send private message
Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Mon Mar 05, 2012 11:21 pm
Reply with quote

I do not have a manual. Is there an online link ? Can I use EZACFSM1 in the HEADER option?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Mar 06, 2012 12:04 am
Reply with quote

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
View user's profile Send private message
Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Tue Mar 06, 2012 1:09 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Mar 06, 2012 1:41 am
Reply with quote

This one is Syncsort getting the time.
Back to top
View user's profile Send private message
Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Tue Mar 06, 2012 2:15 am
Reply with quote

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
View user's profile Send private message
Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Tue Mar 06, 2012 2:22 am
Reply with quote

Got it to work ..using DATE=(4MD.)
Thanks for your support
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 Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top