View previous topic :: View next topic
|
Author |
Message |
kasibhatla_hari
New User
Joined: 20 May 2005 Posts: 11 Location: IRELAND
|
|
|
|
Hi Folks, I need to extracts records from File2 which has a Date2 in YYMMDD format comparing File1 which has a Date1 in CCYYMMDD format.
The Date1 in FILE1 is in postion '1'. LRECL 42 FB
The Date2 in File2 is in Postion'153(149+4)' LRECL 752 VB
The condition of including records is DATE2 = DATE1 -1. Meaning I have system process date going to be generated dynamically by some process.
My process need to read that Date in FILE1 and extract all the records from FILE2 which are processed y'day.
I know to use SPLICE using '11' & '22' and matching with '12'. But this thing is a bit different as there is one Day difference.
If anyone can give an idea whether I can use ICETOOL for this will be of a great help.
Have a nice weekend.
-Hari. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Please show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example. |
|
Back to top |
|
|
kasibhatla_hari
New User
Joined: 20 May 2005 Posts: 11 Location: IRELAND
|
|
|
|
Hi Frank,
Input File1: Only 1 record will be there in FILE1 i.e. Current Processing
----------------------------------------------------------------------------------
Date in POS 1. This File is FB 42.
--------
Code: |
Command ===>
******************
20090907
****************** |
Input File2: Date in POS 153 (149 +4 as it is VB)
---------------------------------------------------------
Code: |
Command ===>
-5----+----6----+----
090907X.......020527
090412X.......030911P
080611X.......020917
850831X.......090903P
090906X.......061106P
051121X.......090507
090906X.......070415X |
My Output should look as below: All duplicates are required to be output
----------------------------------------------------------------------------------
Code: |
090906X.......061106P
090906X.......070415x |
So, I am required to check the Reference Proc Date and Output all the records with Reference Proc Date - 1.
Hope I am clear.
Thanks in advance for all your help.
With Regards |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
kasibhatla_hari,
Is the date file having current date or anydate ?. If it is current date then you can directly use DATE1 parm to get the desired results
Code: |
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(153,6,Y2T,EQ,Y'DATE1'-1)
/* |
If you need to validate the weekends it can be done also . But if you any date other than an offset from current date , then it needs a lot of work around to get the desired results as DFSORT does not support date arthimetic |
|
Back to top |
|
|
Singaram
New User
Joined: 19 Aug 2009 Posts: 19 Location: India
|
|
|
|
How about storing the date - 1 arithmetic itself in a file (using REXX scripts or some other standard procedures) and then comparing the file2 against this manipulated date.
Hope that will be a direct comparison in sort!! |
|
Back to top |
|
|
kasibhatla_hari
New User
Joined: 20 May 2005 Posts: 11 Location: IRELAND
|
|
|
|
Hi Kolusu,
The date is going to be a Proc date generated by system and it is not the current date always. In some scenarios it can be current date but differs in case of long weekends like Halloween in which case Monday is a holiday etc.
I cannot use splice as the fields cannot be matched. If any DFSORT solution will save me lot of time in writing a COBOL or SAS.
Thanks and Regards
-Hari.
Hi Singaram, I am not that gud in REXX except creating dynamic GDGs etc. The main concern is any program other than JCL will go thru lots of QA process which is time consuming. Thats all.
Thanks and Regards,
-Hari. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
The main concern is any program other than JCL will go thru lots of QA process which is time consuming |
Regardless of the "code" used, the promotion process should be the same.
It is an incredibly poorly managed environment that allows promotion of processes without the review. . . |
|
Back to top |
|
|
kasibhatla_hari
New User
Joined: 20 May 2005 Posts: 11 Location: IRELAND
|
|
|
|
dick no one can drop anything without QA live. what i mean to say is the level of effort required to QA a JCL is less than what required for anything else. Anything JCL consumes less effort and cost. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
what i mean to say is the level of effort required to QA a JCL is less than what required for anything else |
I completely understood what you meant to say My point is that this is a very bad practice. Why should "code" in one language be more effort to promote than code in some other language?
When code is implemented using sort control statements, it is still code. Adding a process (jcl) is often less effort than adding code, but this is adding code and people are trying to "beat the system" by calling this code jcl (it is not).
Whatever would be validated for cobol code should be validated for this application as well.
To do otherwise just demonstrates that is a great environment for lack of quality and eventual failure. |
|
Back to top |
|
|
|