Re: DFSORT Header1 with Date

2019-10-02 Thread Sri h Kolusu
Gilson,


DFSORT does NOT support date arithmetic on Header/Trailers. However it is
an easy fix as you just need to add an INREC/OUTREC to get the desired
results.  Basically we add the Current date-1 using OUTREC at a temporary
position say in this case 1501 ( as your LRECL is 1500) and then use it in
the header1  control cards.

Use the following DFSORT control cards which will give you the desired
results.

//SYSINDD *
  OPTION COPY
  OUTREC OVERLAY=(1501:DATE1-1)

  OUTFIL REMOVECC,INCLUDE=(1,1,CH,EQ,C'1'),
  HEADER1=(C'H',DATENS(4MD),TIMENS(24),1501,8),
  OUTREC=(C'DW',1,1269)
/*


Further if you have any questions please let me know

Thanks,
Kolusu
DFSORT Development
IBM Corporation

IBM Mainframe Discussion List  wrote on
09/24/2019 03:50:07 AM:

> From: Gilson Cesar de Oliveira 
> To: IBM-MAIN@LISTSERV.UA.EDU
> Date: 09/24/2019 03:51 AM
> Subject: [EXTERNAL] Re: DFSORT Header1 with Date
> Sent by: IBM Mainframe Discussion List 
>
> Dear list:
>
>   Follow the results using DFSORT:
> ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS,
> EXAMPLES AND MORE
> ICE000I 0 - CONTROL STATEMENTS FOR 5650-ZOS, Z/OS DFSORT V2R3  - 06:
> 00 ON SUN SEP 22, 2019 -
>OPTION COPY

>OUTFIL FNAMES=SORTOUT,REMOVECC,INCLUDE=(1,1,CH,EQ,C'1'),

>HEADER1=(C'H',DATENS(4MD),TIMENS,DATENS(4MD)-1),

>$

> ICE007A 1 SYNTAX ERROR

>TRAILER1=(C'T',COUNT+2=(M11,LENGTH=10)),

>$

> ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED
> CORRECTLY
>OUTREC=(C'D',

>  $

> ICE007A 1 SYNTAX ERROR

>C'W',

> $

>
>
> The problem is in HEADER1 where it doesn't recognise DATENS(4MD)-1
syntax.
>
> The input file has the following:
> RECFM=FB
> LRECL=1500
>
> The content is the following:
> 0021252019092300
> 14070414842360259994070004320324974844070004320324974800
> 140786381980020499940700043203286872920034070004320328687292
> 140790365278068099940700040043713848550064070004004371384855
> 140728887336531009940700043203262145410094070004320326214541
> 140785842023864349940700043203267612270024070004320326761227
> 140703667305626689940700043203224981010084070004320322498101
> 140728041106581529940700043203250917610034070004320325091761
>
>
> The OUTPUT file (SORTOUT) has the following format:
>
> RECFM=FB
> LRECL=1271
>
> The content in the SORTOUT is the following:
>
> H2019092106001820190920
> DW4070371144234620994070004320325220398008407000432032522039813
> DW4078902827390507994070004320328121127005407000432032812112714
> DW4072801894591151994070004320325054784000407000432032505478413
> DW4070340219305668994070004320325749122004407000432032574912212
> DW4078504750297550994070004320326695168009407000432032669516812
> DW4078625679686015994070004320328530484005407000432032853048412
> DW4070336669482787994070004320325770420004407000432032577042014
>
> The syntax when using SYNCSORT runs fine.
>
> When using DFSORT there is a syntax error and we are researching for
> an alternative using it.
>
>
> Regards,
>
> Gilson
>
> --
> 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


Re: DFSORT Header1 with Date

2019-09-25 Thread Edward Finnell
Thanks for the update. His continued involvement carried on the tradition Frank 
Yeager provided us for years. Like yelling over the cubicle "what's this mean?"

In a message dated 9/25/2019 4:26:03 PM Central Standard Time, s...@us.ibm.com 
writes:
ri Hari will be unavailable for some time and not be responding.  The rest of 
the DFSORT support and development teams will respond as they can.

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


Re: DFSORT Header1 with Date

2019-09-25 Thread Max Smith
I'm sorry but Sri Hari will be unavailable for some time and not be responding. 
 The rest of the DFSORT support and development teams will respond as they can.

Max Smith 
DFSMS Development

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


Re: DFSORT Header1 with Date

2019-09-24 Thread Steve Smith
Well, my previous post wasn't helpful.  Those keywords are for INREC, and
do not work in HEADER1=.

Your first issue is that DFSORT HEADER1= requires DATENS=(4MD),TIME=(24)...
i.e. the '=' are required.  But as previously stated, the '-1' isn't
supported at all.

Massimo B.'s advice should help you get on the right track, but it would be
much better if you can replace existing header records using INREC IFTHEN
BUILD logic.  In that case, DATE1-1 should work.  I'm guessing that maybe
your '0' record might be such a header.  If not, then Massimo's idea might
be the best.

It's surprising to me that DFSORT is missing such a trivial feature (DATE
offset in header) that SYNCSORT has.

Obviously, it would be great if Sri Kolusu would deliver his authoritative
answer, but until then, HTH.

sas

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


Re: DFSORT Header1 with Date

2019-09-24 Thread Gilson Cesar de Oliveira
Dear list:

  Follow the results using DFSORT:
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES 
AND MORE   
ICE000I 0 - CONTROL STATEMENTS FOR 5650-ZOS, Z/OS DFSORT V2R3  - 06:00 ON SUN 
SEP 22, 2019 - 
   OPTION COPY  
 
   OUTFIL FNAMES=SORTOUT,REMOVECC,INCLUDE=(1,1,CH,EQ,C'1'), 
 
   HEADER1=(C'H',DATENS(4MD),TIMENS,DATENS(4MD)-1), 
 
   $
 
ICE007A 1 SYNTAX ERROR  
 
   TRAILER1=(C'T',COUNT+2=(M11,LENGTH=10)), 
 
   $
 
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY   
 
   OUTREC=(C'D',
 
 $  
 
ICE007A 1 SYNTAX ERROR  
 
   C'W',
 
$   
 


The problem is in HEADER1 where it doesn't recognise DATENS(4MD)-1 syntax.

The input file has the following:
RECFM=FB
LRECL=1500

The content is the following:
0021252019092300
14070414842360259994070004320324974844070004320324974800
140786381980020499940700043203286872920034070004320328687292
140790365278068099940700040043713848550064070004004371384855
140728887336531009940700043203262145410094070004320326214541
140785842023864349940700043203267612270024070004320326761227
140703667305626689940700043203224981010084070004320322498101
140728041106581529940700043203250917610034070004320325091761


The OUTPUT file (SORTOUT) has the following format:

RECFM=FB
LRECL=1271

The content in the SORTOUT is the following:

H2019092106001820190920
DW4070371144234620994070004320325220398008407000432032522039813
DW4078902827390507994070004320328121127005407000432032812112714
DW4072801894591151994070004320325054784000407000432032505478413
DW4070340219305668994070004320325749122004407000432032574912212
DW4078504750297550994070004320326695168009407000432032669516812
DW4078625679686015994070004320328530484005407000432032853048412
DW4070336669482787994070004320325770420004407000432032577042014

The syntax when using SYNCSORT runs fine.

When using DFSORT there is a syntax error and we are researching for an 
alternative using it.


Regards,

Gilson

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


Re: DFSORT Header1 with Date

2019-09-23 Thread Massimo Biancucci
Hi,

it seems DFSORT is not accepting DATE operations on HEADER1.

If you've got at least one input record and can "accomodate" the record
itself with one more field, you can try something like this:

//SORTIN   DD *
AAA
//SORTOUT  DD SYSOUT=*
//SYSIN DD   *
 INREC IFTHEN=(WHEN=INIT,
  BUILD=(1,80,DATE1-1))
 SORT FIELDS=COPY
 OUTFIL FNAMES=SORTOUT,
  REMOVECC,
  HEADER1=('H',DATENS(4MD),TIMENS(24),81,8)
/*

the trick is to fix DATE-1 into the record itself (the sample is on a
"dummy" 80 lrecl).

Maybe S.K. could give you better hints.

Regards.
Max

Il giorno lun 23 set 2019 alle ore 17:14 Steve Smith  ha
scritto:

> Looks like DATE1,TIME1,DATE1-1 is the DFSORT way. I just found this in the
> " DFSORT Application Programming Guide ", but I haven't tested it.
>
> sas
> ...
>
> > The result is the following in the Header line of the SORTOUT:
> > > H2019092219315220190921
> > > We need the same result in DFSORT but with the syntax in HEADER1 it
> > doesn't
> > > work.
> > >
> > > The question is:
> > >
> > > How to format the HEADER1 in order to have DATE + TIME + (DATE-1)
>
> --
> 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


Re: DFSORT Header1 with Date

2019-09-23 Thread Steve Smith
Looks like DATE1,TIME1,DATE1-1 is the DFSORT way. I just found this in the
" DFSORT Application Programming Guide ", but I haven't tested it.

sas
...

> The result is the following in the Header line of the SORTOUT:
> > H2019092219315220190921
> > We need the same result in DFSORT but with the syntax in HEADER1 it
> doesn't
> > work.
> >
> > The question is:
> >
> > How to format the HEADER1 in order to have DATE + TIME + (DATE-1)

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


Re: DFSORT Header1 with Date

2019-09-23 Thread Lizette Koehler
What do you get with this format?  It helps to see the results you get when you 
use this.

What version of DFSORT?

Can you post the ICE messages?

Thank you 

Lizette


> -Original Message-
> From: IBM Mainframe Discussion List  On Behalf Of
> Gilson Cesar de Oliveira
> Sent: Monday, September 23, 2019 4:10 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: DFSORT Header1 with Date
> 
> Hello:
> 
>We have migrated our sort from SYNCSORT to DFSORT and we are facing issues
> related to syntax in the following situation:
> 
> in SYNCSORT:
>  OPTION COPY
>  OUTFIL FNAMES=SORTOUT,REMOVECC,INCLUDE=(1,1,CH,EQ,C'1'),
>  HEADER1=(C'H',DATENS(4MD),TIMENS,DATENS(4MD)-1),
>  TRAILER1=(C'T',COUNT+2=(M11,LENGTH=10)),
> 
> The result is the following in the Header line of the SORTOUT:
> H2019092219315220190921
> We need the same result in DFSORT but with the syntax in HEADER1 it doesn't
> work.
> 
> The question is:
> 
> How to format the HEADER1 in order to have DATE + TIME + (DATE-1)
> 
> I really appreciate any help.
> 
> Regards,
> 
> Gilson Cesar
> 
> --
> 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