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
 

 

JCL to help achieve without a program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: JCL to help achieve without a program
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Mon Mar 05, 2012 10:51 pm    Post subject: Reply to: JCL to help achieve without a program
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Mon Mar 05, 2012 11:01 pm    Post subject: Reply to: JCL to help achieve without a program
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    Post subject:
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: 1738
Location: Bloomington, IL

PostPosted: Tue Mar 06, 2012 12:04 am    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Tue Mar 06, 2012 1:41 am    Post subject: Reply to: JCL to help achieve without a program
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    Post subject:
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    Post subject:
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    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 I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm
No new posts Need points to tune IMS Checkpoint Pr... satish.ms10 IMS DB/DC 2 Fri Sep 30, 2016 4:12 pm
No new posts ISPF program to set SCRNAME prino TSO/ISPF 5 Fri Sep 30, 2016 2:18 pm


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