DFSORT SYNTAX ERROR using TRAILER and COUNT

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
Jack3615
Member
Posts: 3
Joined: Tue Dec 18, 2012 1:37 am

DFSORT SYNTAX ERROR using TRAILER and COUNT

Post by Jack3615 » Tue Dec 18, 2012 1:46 am

I 'm attempting to use TRAILER and COUNTS to count records and print todays date:

//COUNT EXEC PGM=SORT
//SORTIN DD DISP=SHR,DSN=DSN.INPUT
//SYSOUT DD SYSOUT=*
//SORTOUT DD DISP=SHR,DSN=DSN.OUTPUT
//SYSIN DD *
INCLUDE COND=(129,4,CH,EQ,C'XXXXF',OR,129,4,CH,EQ,C'YYYY')
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(DATE1,2:' NUMBER OF RECORDS: ',COUNT=(M10,LENGTH=7))
SORT FIELDS=COPY

Receives: OUTFIL STATEMENT : SYNTAX ERROR

Can a DATE1 field (or other format) be used in the TRAILER field? Please advise.
Thank you!
Jack
Last edited by Jack3615 on Tue Dec 18, 2012 5:26 pm, edited 1 time in total.

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Tue Dec 18, 2012 3:53 am

If you look in the documentation, DATE1 is not possible, but other date formats are.

What do you need to see the date as? Can it be in a different format?

Jack3615
Member
Posts: 3
Joined: Tue Dec 18, 2012 1:37 am

Post by Jack3615 » Tue Dec 18, 2012 5:28 pm

I'd like to have something with YYYYMMDD but I'm willing take whatever is a valid format. Can you please describe some of the pertinent date formats I could use? Thanks, Jack

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Tue Dec 18, 2012 5:44 pm

DATE is possible, and you should be able to get a four-digit year, month and day, in whichever order you like.

Find OUTFIL in Chapter 3. Find the description of HEADER1, and it explains the valid date formats and options, they are the same for TRAILER1.

Jack3615
Member
Posts: 3
Joined: Tue Dec 18, 2012 1:37 am

Post by Jack3615 » Tue Dec 18, 2012 6:16 pm

Could you provide a link to the correct DFSORT book/manual, as I'm having trouble locating the information. Thanks, Jack

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Tue Dec 18, 2012 6:52 pm


Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others