Page 1 of 1

Insert date into a file

PostPosted: Thu Feb 11, 2016 4:12 pm
by gauravfrankly
Hi all,

I want to create a FB PS file having date in each row in below pattern using SORT/DFSORT
19000101
19000102
19000103
19000104 .... and so on.

Re: Insert date into a file

PostPosted: Thu Feb 11, 2016 5:02 pm
by enrico-sorichetti

Re: Insert date into a file

PostPosted: Thu Feb 11, 2016 5:22 pm
by gauravfrankly
Hi enrico, topic you provided is having Julian date conversion. I need to create a new file with Greg Date incremented by 1 day in every next row.

Re: Insert date into a file

PostPosted: Thu Feb 11, 2016 5:35 pm
by enrico-sorichetti
I said FOR HINTS, not that it would be a FULL working solution

Re: Insert date into a file

PostPosted: Thu Feb 11, 2016 6:57 pm
by gauravfrankly
can you please provide the logic or syntax of SORT card to get this done

Re: Insert date into a file

PostPosted: Thu Feb 11, 2016 7:59 pm
by enrico-sorichetti
the snippet in the topic linked makes easy to construct a dataset with a JULIAN date

this link will tell how to add a couple of statements to convert a julian date to the equivalent gregorian
ftp://ftp.software.ibm.com/storage/dfso ... rtugpg.pdf

Re: Insert date into a file

PostPosted: Thu Feb 11, 2016 8:36 pm
by NicC
This is NOT a JCL topic but you wanted a DFSort solution so WHY did you post in the JCL section?

Re: Insert date into a file

PostPosted: Fri Feb 12, 2016 11:00 am
by gauravfrankly
NicC apologies for this. Will keep it in mind to post in correct forum.