开发者

Compare Packed decimal Julian date with (Packed decimal Current Julian date-7days) using JCL- SYNCSORT?

I have a requirement as below.

In my Input file, I have Packed decimal Julian date[YYYYDDD format] in 23rd position (position 23, length 4).

  1. If my the input Julian date is less than (Current Julian date - 7 days) then write the 开发者_StackOverflow中文版records into Out File1.

  2. Else Write the records into Out file2.

Can anybody let me know how to Compare Packed decimal Julian date with (Packed decimal Current Julian date-7days) using JCL- SYNCSORT?


You can use this...

SYSIN  DD *
SORT FIELDS=COPY,
OUTFIL FNAMES=01,
INCLUDE=(23,4,PD,EQ,DATE3P-7)
OUTFILF FNAMES=02,SAVE

DATE3P gives the current date in P'YYYYDDD' packed decimal format.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜