検索

Article
· Nov 16 2m read

Network Debugging for Beginners - 2

In my previous article, I structured network communications
in these 3 possible layers, and covered the last

  • Client <---> Transport
  • Server <---> Transport
  • Client <---> Server

In fact, you have the most control over the last one.
The IRIS side as a server is yours and under your full control. 
Up to now, the Transport layer was assumed to be as passive as a bare wire.

This assumption should be verified. I once met a Windows environment with
a quite surprising setup where a Firewall-like filter was isolating internal
processes and causing a lot of trouble.

? What can you do about the  Transport section ?

In a typical setup, firewalls filter and/or block selected connections by Web Address
or by type of protocol.  WebSockets seems to be one of their preferred targets.  
And even Microsoft's IIS requires special settings to pass along the WebSocket protocol.

Now we have reached the wire. If there is no direct connection as in a LAN,
every router you have to pass is expected to just forward messages.
Though they might also be a show stopper, acting like a firewall.

It's eventually a rare case, but it could never be excluded.
And there is still another dimension related to the Transport.
Earlier we have seen what we think to receive and what we expect to send.

? Is this the reality out on the wires ?

I know of 2 tools I have used that helped me along often.
Both act by the same principle as a tunnel and mimic client and server.
Receive messages, log them with timestamps, and forward them to the other end.

The ultimate tool is Wireshark. I guess no bit on the wire can escape from it.
Though it is easy to start, the correct interpretation is a science that requires
related experience and deep digging into details.
Being in networks for almost 60 years, it was the best tool in that area I have ever met.
It is to me what Mona Lisa might be for painters or Mount Everest for climbers.

But in most average troubleshooting exercises it's an overkill.
TCPtrace creates a tunnel and keeps track of what is going forward and back.
For some time, it is also able to handle UDP protocol too.
And it is really easy to handle and to consume! 

As you have seen in the simple example with  our management portal:

  • What you see in IRIS in the CSP page is HTML and JavaScript
  • What you see in the browser is also just HTML and JavaScript
  • But invisible and under cover, headers and cookies are traveling along

You may face situations where your problem is exactly hidden there.
The experiment with manually composed HTML showed it.

Discussion (0)1
Log in or sign up to continue
Article
· Nov 16 3m read

Network Debugging for Beginners - 1

Chasing errors or misbehavior in the network can be quite a challenge.
Differently to  a local application on the DB server, you always have at least 3 players:

  • A client  to place a request 
  • some kind of transport layer
  • and a server to provide a reply.

This results in a minimum of 3 possible communication layers

  • Client <---> Transport
  • Server <---> Transport
  • Client <---> Server

The last one is probably the easiest  to check, while the other 
two deal with the same counterpart just from opposite sides.

?  Do both ends use the same communication protocol ?

I met more than once that one end expected to use TCP protocol,
but the other side was using UDP or WS (WebSockets) or whatever.
And IF they match ?

? How does the request look?

You may direct a request for a CSP page to a private port
Using 773 instead of 52773 for the IRIS Management Portal

USER>set port="|TCP|777"
USER>open port:(:773):1 write  $t
1
USER>use port read what  

Now  you launch your request from the browser  http://localhost:777/csp/sys/UtilHome.cs
and see

USER>write what
GET /csp/sys/UtilHome.csp HTTP/1.1
Host: localhost:773
Connection: keep-alive
sec-ch-ua: "Chromium";v="142", "Google Chrome";v="142", "Not_A Brand";v="99"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: none
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Accept-Encoding: gzip, deflate, br, zstd
Accept-Language: en-US,en;q=0.9,de-AT;q=0.8,de;q=0.7
Cookie: state-B88AC959-5DBA-11F0-86C0-0242C0A80002=/5jOrv7mM4MMdJCVpOCgtb1j0WTGCB4RZF2IHT4Og+4%3D%3ASYSEXP%3A; state-84BBBB0F-94B2-11F0-BAB4-0242C0A80006=/5jOrv7mM4MMdJCVpOCgtb1j0WTGCB4RZF2IHT4Og+4%3D%3ASYSEXP%3A; state-1E3B3956-9A2D-11F0-AD45-0242C0A8000B=7xLBuIkd9LEHE63vfvhZkekO0SUMlGruyPOWuYCUrt8%3D%3ASYSEXP%3A;
USER>

The first lines tell you that your request is using HTML on top of HTTP
That means that HTML is used as the content protocol embedded in HTTP

Your port 773 is bi-directional.
So you might be tempted to compose an HTML wrapped reply and send it back just like  

USE port WRITE "<H1>some friendly welcome</H1>",!

As this is not proper HTML and as you miss all required headers and other credentials
for a clean HTTP communication, your Browser may dislike it at least.
Therefore, the next question:

? How does the proper reply look like ?

There is a utility tool in IRIS  to examine the reply to some level.

USER>DO $system.CSP.Shell()
CSP:USER>>>GET /csp/sys/UtilHome.csp

HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Set-Cookie: CSPSESSIONID-UP-csp-sys-=3100      3100; path=/csp/sys/;  httpOnly; sameSite=strict;
Cache-Control: no-cache,no-store
Date: Sun, 16 Nov 2025 15:05:37 GMT
Expires: -1
X-Frame-Options: SAMEORIGIN
<html lang="de" >
<head>
<title>IRIS - Home</title>
<link rel="stylesheet" type="text/css" 
. . . . . . . . .

You should enable logging for the terminal to study this 120k byte reply in detail

Now it is your next step to dig deeper.

For our example with the CSP page and a browser client, you have 3 options:

  1. :  Use your browser development tools to examine the content
  2. :  Use JavaScript alert()  to display some inner invisible content
  3. :  Use JavaScript combined with HTML textarea for more content   

At the server end in IRIS, it's a bit easier.

Every CSP page generates a class, which also generates an INT routine
You have the option to add debugging code at all levels
Just as you would do for any normal background job.
Most likely, this is a sequence that is looping until manually released,
or just some kind of individual tracing with ^ERN or a similar approach.

And this works not just for CSP pages but also for %REST processing.

? And what about the Transport step ?

See part 2 of Network Debugging for Beginners 
Network Debugging for Beginners - 2

Discussion (0)1
Log in or sign up to continue
Article
· Nov 15 1m read

Amostra de código para concatenar arrays JSON

O ObjectScript não inclui nenhum método embutido para anexar um array dinâmico JSON a outro. Aqui está um trecho de código que uso, que é equivalente ao método concat() do JavaScript.

Chame-o com qualquer número de argumentos para concatená-los em um novo array. Se um argumento for um array dinâmico, seus elementos serão adicionados. Caso contrário, o próprio argumento será adicionado.

Discussion (0)1
Log in or sign up to continue
Article
· Nov 15 7m read

Web Development Companies USA – Key Benefits Explained

The online world is growing fast, and every business now needs a strong website to survive. A website is more than a digital card. It works like a store, a brand space, and a trust-builder. Because of this, many people look for Web Development Companies in USA to help them build a strong and smart website. These companies understand modern trends, simple design, and customer behavior. As a result, they help brands grow faster online.

Today, working with Web Development Companies in USA is one of the best choices for any business that wants to reach more people, stay ahead of the competition, and give users a smooth online experience. In this blog, you will learn the biggest benefits of working with these companies and why they matter for your success.

Understanding the Growing Need for Professional Website Development

Many businesses try to build a website on their own, but soon they notice that it's not easy. A good website needs planning, design, coding, speed, and clear structure. It must also work well on phones, tablets, and desktops. Because the digital space is now crowded, only a high-quality website can stand out.

This is why many brands choose expert help. When a skilled company builds your website, you get a site that works smoothly and loads fast. More importantly, it supports your marketing, SEO, and sales goals. As customers today want easy and quick online experiences, a well-built website helps you connect with them better.

Why Many Businesses Prefer Companies in the USA

The United States has one of the most advanced digital markets in the world. As a result, Web Development Companies in USA understand modern tools, updated design rules, and the right way to create strong digital platforms. They follow global standards and offer high-quality service to businesses in different industries.

Now, let us move deeper and learn the key benefits of working with these companies. The content below is divided into top-level, middle-level, and bottom-level information to help you understand everything clearly and step by step.

Understanding What Makes a Website Strong

A strong website is easy to use, loads fast, and guides visitors to the right place. It should look clean and clear. Most of all, it must make users want to stay longer and explore.

Professional developers create websites that fit your brand and speak to the right audience. They build the design, layout, content areas, buttons, and structure based on what your customers need. When this happens, your website becomes a tool that works for your business every day.

Top-Level Awareness Section

Why Businesses Need Strong Websites Today

People today spend more time online shopping, learning, and comparing products. If your business does not have a strong website, you may lose many customers. And even if you have a website, it must be built the right way.

A poorly built website confuses visitors. They leave quickly, and this hurts your online score. On the other hand, a well-made website builds trust and makes people want to connect with you. This is why many brands turn to Web Development Companies in USA. They want websites that look modern, load fast, and guide visitors smoothly.

Why Free or Simple Website Builders Are Not Enough

Many businesses try to use free website builders because they look easy at first. But soon, they see the problems:

  • Limited customization
  • Slow loading speed
  • Not enough security
  • Bad structure
  • Weak SEO support

Because of these problems, businesses later switch to professional developers. Even though free tools can help beginners, they cannot match the quality of expert development.

What Makes USA-Based Web Developers Different

Businesses choose Web Development Companies in USA because they follow strong standards. These companies know the latest web design trends, use updated tools, and build websites for local and global audiences. They also offer strong support, so your site stays updated for years.

Better User Experience

User experience plays a big role in online success. If your visitors cannot find things easily, they leave fast. But if your website is simple, clear, and friendly, they stay longer. This helps you build trust and improve conversions. USA-based developers focus heavily on user experience because they know how important it is for business growth.

Safe and Secure Websites

Security is a huge concern in the online world. Many sites get attacked because they do not have proper protection. However, when you work with Web Development Companies in USA, you get websites with strong security features. They protect your data, customer information, and online payments, giving you peace of mind.

Middle-Level Consideration Section

Understanding the Real Value of Professional Web Development

After learning why strong websites matter, many businesses want to understand what they get when they hire an expert team. This section explains the deeper benefits.

Professional web development teams build websites that support your brand goals, long-term marketing plans, and user needs. They design each part with a purpose. Because of this, your website becomes a strong marketing tool.

Custom Design for Your Brand

Your website represents your business online. It should feel like your brand. Many Web Development Companies in USA spend time studying your business needs. They learn your goals, your audience, and your market. Then they create a design that matches your identity. This helps you stand out from your competitors.

Strong SEO Structure

A website that does not rank on search engines cannot bring results. That is why these companies build SEO-friendly websites. They add:

  • Clean URLs
  • Clear headings
  • Fast loading
  • Mobile optimization
  • Simple navigation

With these elements, your site becomes more visible on search engines. As a result, more people find your business.

Better Mobile Experience

Today, many people use phones to browse websites. This means your website must work perfectly on mobile devices. If not, you may lose half of your visitors. But Web Development Companies in USA use mobile-first design. This means they build your website to look perfect on phones, then expand it for bigger screens.

This helps you reach more people and keeps visitors happy.

Speed Optimization

Many users leave a website if it takes more than a few seconds to load. Slow loading also hurts your Google ranking. Expert developers use tools to make your website load faster. They reduce file sizes, clean the code, and optimize the design. This helps your site perform well on search engines and keeps users engaged.

Reliable Maintenance and Support

Websites need updates, security checks, and content changes. Many Web Development Companies in USA offer long-term support so your site stays fresh and secure. This saves you time and stress. You do not have to worry about technical problems because experts handle everything.

Better Conversion Rates

A website must guide visitors to take action. This action can be buying something, contacting you, or signing up for a service. Professional developers know how to build layouts that lead visitors to these actions. When the path is clear, more people convert, and your business grows faster.

Bottom-Level Decision Section

Why Working with USA-Based Web Developers Is a Smart Long-Term Choice

After understanding all the benefits, many businesses reach a point where they must choose the right team. At this stage, you need to think about long-term growth, support, and quality.

Choosing Web Development Companies in USA is a smart investment because you get expert service, quick support, and websites built with advanced technology. These companies also understand search engines, modern tools, and online behavior. This helps your business stay strong in a competitive market.

Strong Communication and Clear Process

Working with teams in the USA gives you clear communication, fast updates, and a structured process. Many companies follow organized workflows like:

  • Research
  • Planning
  • Wireframing
  • Designing
  • Development
  • Testing
  • Launch

This step-by-step flow keeps your project smooth and stress-free.

Access to Experienced Teams

Another benefit of hiring Web Development Companies in USA is that you get access to talented experts. They know how to build websites for different industries, so they understand your challenges and needs. This helps you get better results in a shorter time.

Future-Proof Technology

The online world changes quickly. New tools, security rules, and design trends appear every year. USA-based developers use future-proof methods so your site stays updated and safe. You will not need a complete redesign every year because the foundation remains strong.

Better ROI for Your Business

Although expert development may cost more than simple website builders, the return on investment is much higher. You get a powerful website that brings traffic, leads, and sales. This supports your long-term business goals.

Grow Your Online Presence With DecodeUp’s Web Development Services in the USA

DecodeUp is a trusted partner for businesses looking for expert website solutions in the USA. Our team builds clean, fast, and user-friendly websites that match your brand and help you grow online. We focus on smart design, smooth performance, and strong security so your business can stand out in a crowded market. If you want a reliable team that understands your goals and delivers high-quality results, DecodeUp is here to support you. Connect With Us.

Conclusion

Choosing Web Development Companies in USA is one of the smartest decisions any business can make today. These companies build strong, fast, secure, and user-friendly websites that help you grow online. They understand modern tools and follow global standards, so your site becomes a powerful marketing and sales tool.

When you work with experienced teams, you save time, reduce stress, and get long-term support. Most of all, you get a website that makes your brand look professional and trustworthy. As more people move online, having a strong website is no longer a choice. It is a must for every business that wants to grow.

With the help of Web Development Companies in USA, you can build a digital presence that drives traffic, increases conversions, and supports your goals for many years.

Discussion (0)1
Log in or sign up to continue
Article
· Nov 14 5m read

CNPJ Será Alfanumérico a partir de julho de 2026 - Classe Atualizada

Pessoal, segue Classe para validar CNPJ alfanumérico Receita Federal, que entra em vigor a partir de julho de 2026.

link: CNPJ Alfanumérico — Receita Federal

Class Utils.Br.Validador
{ /// <summary>
/// Valida um CPF, CNPJ numérico ou CNPJ alfanumérico.
/// Detecta o tipo (11 ou 14 dígitos) e chama o validador apropriado.
/// Retorna 1 (true) se válido, 0 (false) se inválido.
/// </summary>
/// <param name="documento">O número do CPF ou CNPJ, com ou sem formatação.</param>
ClassMethod Validar(documento As %String) As %Boolean
{
    // 1. Limpa a formatação (pontos, traços, barras) e converte para MAIÚSCULO
    Set docLimpo = ..LimparFormatacao(documento)
    Set len = $LENGTH(docLimpo)
    
    // 2. Direciona para o método correto baseado no tamanho
    If len = 11 {
        Quit ..ValidarCPF(docLimpo)
    }
    
    If len = 14 {
        Quit ..ValidarCNPJ(docLimpo)
    }
    
    // Se não tiver 11 ou 14 dígitos, é inválido
    Quit 0
} /// <summary>
/// Valida um número de CPF (11 dígitos).
/// </summary>
/// <param name="cpf">O CPF (idealmente já sem formatação).</param>
ClassMethod ValidarCPF(cpf As %String) As %Boolean [ Private ]
{
    Set cpf = ..LimparFormatacao(cpf) // Garante limpeza extra
    If $LENGTH(cpf) '= 11 Quit 0 }
    
    // CORREÇÃO: Verifica se todos os dígitos são iguais (ex: "11111111111")
    If $TRANSLATE(cpf, $EXTRACT(cpf, 1), "") = "" Quit 0 }
    
    // Cálculo DV1
    Set soma = 0
    For = 1:1:9 {
        Set soma = soma + ($EXTRACT(cpf, i) * (11 - i))
    }
    Set resto = soma # 11
    Set dv1 = $SELECT(resto < 2: 0, 1: 11 - resto)
    If dv1 '= $EXTRACT(cpf, 10) Quit 0 }
    
    // Cálculo DV2
    Set soma = 0
    For = 1:1:10 {
        Set soma = soma + ($EXTRACT(cpf, i) * (12 - i))
    }
    Set resto = soma # 11
    Set dv2 = $SELECT(resto < 2: 0, 1: 11 - resto)
    If dv2 '= $EXTRACT(cpf, 11) Quit 0 }
    
    Quit 1
} /// <summary>
/// Valida um número de CNPJ (14 posições), numérico ou alfanumérico,
/// conforme o Anexo XV da IN RFB nº 2.119/2022 (adicionado pela IN RFB nº 2229/2024).
/// </summary>
/// <param name="cnpj">O CNPJ (já limpo e em maiúsculas).</param>
ClassMethod ValidarCNPJ(cnpj As %String) As %Boolean [ Private ]
{
    If $LENGTH(cnpj) '= 14
     Quit 0
     }     // CORREÇÃO: Verifica sequências de caracteres idênticos (ex: "AAAA...")
    If $TRANSLATE(cnpj, $EXTRACT(cnpj, 1), "") = "" {
    Quit 0
    }
    
    // 3. Cálculo do 1º Dígito Verificador (DV1)
    Set soma = 0
    Set pesos = "543298765432"
    For = 1:1:12 {
        Set char = $EXTRACT(cnpj, i)
        Set valor = $ASCII(char) - 48
        Set soma = soma + (valor * $EXTRACT(pesos, i))
    }
    
    Set resto = soma # 11
    Set dv1 = $SELECT(resto < 2: 0, 1: 11 - resto)
    
    // 4. Verifica o DV1
    If dv1 '= $EXTRACT(cnpj, 13) Quit 0 }
    
    // 5. Cálculo do 2º Dígito Verificador (DV2)
    Set soma = 0
    Set pesos = "6543298765432"
    For = 1:1:13 {
        Set char = $EXTRACT(cnpj, i)
        Set valor = $ASCII(char) - 48
        Set soma = soma + (valor * $EXTRACT(pesos, i))
    }
    
    Set resto = soma # 11
    Set dv2 = $SELECT(resto < 2: 0, 1: 11 - resto)
    
    // 6. Verifica o DV2
    If dv2 '= $EXTRACT(cnpj, 14) Quit 0 }
    
    // Se passou por tudo, é válido
    Quit 1
} /// <summary>
/// Remove caracteres de formatação (., -, /) e converte para MAIÚSCULAS.
/// </summary>
ClassMethod LimparFormatacao(valor As %String) As %String [ Private ]
{
    Set valorLimpo = $TRANSLATE(valor, ".-/", "")
    Quit $ZCONVERT(valorLimpo, "U")
} }
 

// Testando um CNPJ numérico antigo (ainda válido)

USER> WRITE ##class(Utils.BR.Validador).Validar("33.000.167/0001-01")

USER>1

// Testando um CPF (não mudou)

USER> WRITE ##class(Utils.BR.Validador).Validar("123.456.789-00")

USER>1

// NOVO TESTE: O CNPJ Alfanumérico do Exemplo 2 da RFB [cite: 44]

USER> WRITE ##class(Utils.BR.Validador).Validar("12.ABC.345/01DE-35")

USER>1

// NOVO TESTE: O mesmo CNPJ com dígito verificador errado

USER> WRITE ##class(Utils.BR.Validador).Validar("12.ABC.345/01DE-30")

USER>0

// NOVO TESTE: Com letras minúsculas (será tratado)

USER> WRITE ##class(Utils.BR.Validador).Validar("12.abc.345/01de-35")

USER>1

 

Se houver necessidade de ajuste, fiquem a vontade para informar.

Obrigado.

Discussion (0)1
Log in or sign up to continue