Couple of clarifications 

1. It is DFSORT and not DFHSORT(There is no H)
2. Your error messages start with WER which indicates you are using 
Syncsort and not DFSORT
3. You don't need to use INCLUDE=ALL as it is the default to include all 
records for DFSORT
4. The same is the case for specifying Files=OUT as SORTOUT is the 
default.

Either way if you need last month date, you need to use date2 parm but you 
need to use on inrec/outrec . 

I assumed that your input has an lrecl of 80 bytes and we put the previous 
month date at position 81 and remove it using BUILD on outfil

This is a working syntax for DFSORT, but i cannot comment on the other 
product

//SYSIN    DD * 
  SORT FIELDS=(1,2,CH,A) 
  OUTREC OVERLAY=(81:DATE2-1) 
 
  OUTFIL BUILD=(1,80), 
  HEADER1=('DATE',15:81,6) 
//* 

Thanks,
Kolusu
DFSORT Development

IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> wrote on 
03/02/2017 02:44:39 PM:

> From: "George, William@FTB" <bill.geo...@ftb.ca.gov>
> To: IBM-MAIN@LISTSERV.UA.EDU
> Date: 03/02/2017 02:45 PM
> Subject: DFHSORT - Date Display of Previous Month
> Sent by: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU>
> 
> I'm having a heck of a time attempting to create a sort header to 
> display the previous month in YYYYMM format.
> No matter what I do I get a syntax error and I've attempted many 
> different ways.
> 
> Here is the most recent attempt.  I do not see why there is a syntax
> error where indicated.
> 
> SYSIN statements
> 
> SORT   FIELDS=(1,2,CH,A)
>  OUTFIL FILES=OUT,
>  INCLUDE=ALL,
>       HEADER1=(1:C'DATE',
>               15:&DATE2)
> 
> And the error
> SYSIN :
>       SORT   FIELDS=(1,2,CH,A)
>       OUTFIL FILES=OUT,
>       INCLUDE=ALL,
>            HEADER1=(1:C'DATE',
>                              *
>                    15:&DATE2-1)
> WER268A  OUTFIL STATEMENT  : SYNTAX ERROR
> 
> 
> Any insights are appreciated
> 
> Bill
> 
> ______________________________________________________________________
> CONFIDENTIALITY NOTICE: This email from the State of California is 
> for the sole use of the intended recipient and may contain 
> confidential and privileged information. Any unauthorized review or 
> use, including disclosure or distribution, is prohibited. If you are
> not the intended recipient, please contact the sender and destroy 
> all copies of this email.
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> 



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to