Viewing 15 posts - 571 through 585 (of 686 total)
param (
[parameter(mandatory = $true, ValueFromPipelineByPropertyName = $true)][AllowEmptyString()][string]$Sender,
[parameter(mandatory = $true, ValueFromPipelineByPropertyName = $true)][AllowEmptyString()][string]$FileDate,
[parameter(mandatory = $true, ValueFromPipelineByPropertyName = $true)][AllowEmptyString()][string]$RecordType
)
# Check for at least one parameter selected
if ($Sender -eq ""...
March 20, 2021 at 12:23 am
I really appreciate all of your help and suggestions, and code... I'll see if I can take your snippets and code samples
to try and see if I can get a...
March 19, 2021 at 12:07 am
Is there anything you can run to determine types of files your processing?
March 18, 2021 at 11:57 pm
I was using:
$fileData = [System.Text.Encoding]::UTF8.GetString($bytes);
March 18, 2021 at 1:19 am
What would the code look like that follows the rules outlined above that looks at specific positions within the data record. I checked the records and for Inbound ISA records...
March 17, 2021 at 6:47 pm
Would this make the script any easier for lookups and speed.
Seems like there are 2 different formats the records could use for Inbound(which I would already know because of the...
March 17, 2021 at 12:01 pm
I outputted these values:
# Validate this is an EDI file
$fileData.Substring(0,3)
ISA
# Get the data element separator and segment element separator
$dataElement = $fileData.Substring(3,1);
*
$segmentElement = $fileData.Substring(105,1);
{
It seems the record start at zero(0) based...
March 17, 2021 at 1:50 am
I put output for filenames and found that the delimiter switched from * to a bar(|) delimiter. Is there a way to dynamically
figure out delimiter?
Thanks for suggestions..
March 17, 2021 at 1:14 am
Thanks for update to script...
I started it and got a message:
You cannot call a method on a null-valued expression
Error came from:
if (($firstRow[6].Trim() -eq $Sender -or $Sender -eq "") -and ($firstRow[9]...
March 16, 2021 at 8:11 pm
Thanks for replies... I'll test that code out..
Do you anticipate with 1000's of files to search this lookup to be slow?
Thanks.
March 16, 2021 at 7:24 pm
Could you inject that into the code so I can see how that may work, do I still you default values in script?
Thanks for response..
March 16, 2021 at 3:10 pm
If I set a default value that maybe not the date I'm searching for that sender or the RecordType.
or if I search for Date it maybe not the sender(if I...
March 16, 2021 at 11:32 am
When I call with just sender parn
You cannot call a method on a null-valued expression.
At C:\PowerShell\edi_archive_lookup.ps1:8 char:1
+ $strFileDate = $FileDate.ToString("yyMMdd");
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
March 16, 2021 at 1:11 am
param (
[parameter(mandatory = $false, ValueFromPipelineByPropertyName = $true)][string]$sender,
[parameter(mandatory = $false, ValueFromPipelineByPropertyName = $true)][datetime]$fileDate,
[parameter(mandatory = $false, ValueFromPipelineByPropertyName = $true)][string]$RecordType
)
# Convert input date to string YYMMDD
$strFileDate = $FileDate.ToString("yyMMdd");
# Get list...
March 16, 2021 at 12:27 am
Viewing 15 posts - 571 through 585 (of 686 total)