sort unmatched records using join key - mainframe

I have two GDG files (-1 & 0 version). Using these two files a flat file needs to be generated which will have Insert records(records which are not in -1 version but are in +0 version), Delete records(records which are in -1 version but are not in +0 version) and Update records(records which are in both the versions but the +0 version might have changes in some of the fields). How can i get those update records? Can i do it using Joinkeys, if yes, How?
Note: The update can be anywhere from column 1 to the last column of the file(+0 version of the GDG) and also my file didn't have any unique key. the change will be happen in any field.

Related

Highlight the updated values when file data or version gets updated in Azure Data Factory

I have created a dataflow in Azure Data Factory to find the differences between the two files, both the files have the same columns and structure. I would like to find/highlight the changes to each value rather than get the updated rows as the output which I am currently getting.
Example:
Current output -
No.
Name
Email
1
Jack
jack#email.com
Desired output -
No.
Name
Email
Jack
I wish to either get the unchanged data in the row as NA or a blank or the changed data as highlighted in some way.
Dataflow -
Thank you for the assistance
I think you should be use the CRC function ( something like crc32(columns()) and get the hash of each row for both the files and the join on the hash1=hash2 and it should give you all the rows which has not been updated and have an exact match .
For the row with some changes , you can use also you can use join hash1!=hash2 clause bnut you will need one unique identfier .

Automatically update the file path of Vlookup to the newest workbook added to a folder

Hello each month we receive a series of monthly returns from different accounts which go into a designated folder based on the account name. Each return has the new month's returns appended to all the previous monthly returns. I am running a vlookup function on my workbook based on the specific return I am looking for. Is it possible to change the source on the vlookup function so it takes the data from the most recently added file in the folder, that way it will contain all the most recent return data with all the previous returns?
Thanks
There are many ways to do that. The first step should be to connect to the designated folder. You should see then something like this:
Option 1: If the file contains the month
If your file contains the month you can use it to extract this information. Following the example above you could:
extract the first 7 charactes and parse it to a date.
sort the date in descending order, so the latest file will be on top
use keep rows to get rid of the rest of files
with the last file remaining, expand the content
Option 2: Use file properties
When you connect to a folder you can see the field "Date created". Use this the same way as explained in option 1.
Option 3: Remove duplicates
If for whatever reason the two options above are not possible, depending on your data you can:
join all files which will lead to duplicates
filter duplicates
This third option might not work if you could have two registers which look the same (all columns in the row have the same value) can appear in your dataset.

Azure Search, Track deletions don't work

As you can see bellow, The "IsActive" column define to detect deletion.
If I go to the DB and change a record "CreationTime" and some data, after running the indexer the changes are applyied in the search service.
Though if I go to the DB and change the IsActive column to 0 (false, since it is a bit column) and the creation time off course, after running the indexer I expect the record to disapear from the search service but it is still there.
When updating IsActive column, you need to also update CreationTime to indicate that the row has changed.
Also, Azure Search sees BIT columns as boolean values instead of 0/1 - so try using "false" as the delete marker value.
Note that SQL integrated change tracking policy would take care of both updates and deletes - consider using it if possible.
The value needs to be set as a string in quotes, so for you, the exact value that you should put in the field "Delete Market Value is "false" including quotes.
IsActive column to 0 (false, since it is a bit column)
Here's the problem. According to the newest documentation:
if you have an integer column where deleted rows are marked with the
value 1, use "1". If you have a BIT column where deleted rows are
marked with the Boolean true value, use the string literal True or
true, the case doesn't matter.
So in my case (BIT column), I've set true (without quotes) as delete marker value and everything works like a charm.

Using a NetSuite saved search formula to filter from system notes

I am attempting to use a NetSuite saved search to bring back system notes for whenever an assigned person changes for a case. However, I would like to grab the initial assigned person and not the multiple re-assignments after that. Is there a way for me to only select the initial value rather than having all re-assignments come back to me? Is this able to be done from a formula somehow?
to get the oldest assignee of case you can use below criteria so, that results is restricted to just one result per case
1) System Notes : Field is assigned
2) System Notes : Old Value is empty
In the results add the column System Notes : New Value along with other columns of case. This field will pull the oldest assignee of the case
PS : solution assumes that there won't be any empty re-assignments. If there are empty re-assignments you should sort the results by Case unique identifier such as number or internalid and then by System Notes : Date, and the oldest date line would be the result that you are looking for.
Actually you can do that with a search clause where the old value is empty

SharePoint Calculated Field resets on item edit

I am using a SharePoint list that was migrated from an old Windows 2003 server to an existing 2008 server. This list is used to track issues raised by users against another application - a list of jobs to do if you will.
In the old list there was an Id field. When the list was recreated in the new area the assigned ID number was different, for example
Old ID New ID
--------- ---------
5 204
6 2
7 3
8 159
9 4
This assignment does appear to be fairly random.
To negate this a calculated column was created, so IDs raised before the migration use the Old ID number, and new calls raised after the migration use a calculated value. The calculation is
=IF(ISBLANK([ID (Old)]),ID+8,IF([ID (Old)]<=348,[ID (Old)],ID+8))
This compares the ID (Old) to blank, and if so, it is a new call and should have the default ID number, plus 8 (I think there was a total of 8 calls made during development that were then removed).
Otherwise if the Old ID number is less than 348 (the call number when we migrated), use the Old ID number.
If neither condition is met, simply set the ID to the new ID number plus 8.
This works fine when creating new calls.
The problem arises when I edit a call. For example if I set the ETA to a new value and save the call, the Calculated ID is always reset to 8.
I can fix this by going in to List Settings -> Opening the calculated column -> and clicking OK. This reapplies the calculation and everything is numbered correctly again.
For information - due to the environment this is deployed in I am not able to use SharePoint Designer at all.
The question is, how can I stop the renumbering when I edit an item?
The ID field behaves a bit oddly with calculated columns. A calculated column formula will find the ID of an item and resolve it properly when items are created or when the formula is modified, but as you discovered, when an item is modified, the formula can't find the ID value. (My guess is that this has to do with the ID field not being included in the list of column values being sent to the database on update, perhaps because the ID field should never change.)
One way around this is to use a workflow (or a custom event handler, if you have too much time on your hands) to copy the ID field to another column, such as a number or single line of text column, whenever an item is created. You can then use that new column in your formula instead of using the ID column.
To prevent people from updating your dummy ID column, you can hide it from the forms. To do this, first enable management of content types for the list, then edit the Item content type, find the new dummy ID column, and change it to "Hidden" (instead of "Required" or "Optional").

Resources