• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

fetch single

jeremey_garcia

VIP Member
Hey,

I'm trying to do a fetch single to a UDC table. The problem I'm having is that the UDC itself is stored weird. I'm able to find what I'm looking for by putting the Type and product code in, and manually searching for it. However, if I put the UDC in it will not find it. Example:

ProductCode = 06
ProductType = G
UDC = 1450

The UDC viewed through the '400 is stored with 4 blanks, 1450, 2 blanks.

When I tried manually putting spaces in before and after teh "1450" it still doesn't find it. Anyone run across this before? Any ideas will be appreciated.

TIA.



Jeremey Garcia
Xe SP14 ES - AS/400 CO - AS/400 Deploy - NT Citrix
 

Frosty the Coder

Legendary Poster
This reply may show up twice, as
I tried via email prior to trying
the forum.

Rather than a FETCH of F0005, give
the bsfn GetUDC a try. It's the
tinkertoy designed to do what you
are trying to accomplish.

Good luck.

Gene Piekarski, Jr

AS/400, B733, SP11.2, NT client
AS/400, B733, SP14, W2000 client
XE, SP15.1
 

Zoltan_Gyimesi

Legendary Poster
Hi Jeremey,

My two cents are to use standard OW BSFNs to retrieve UDC informations instead of FetchSingle F0005 or F0005D table.

If you search for BSFNS as "Get UDC*" then you will find several BSFNs. I prefer the "Get UDC" BSFN in X0005 BSFN source modul. You can easily figure out how to pass and get parameters to/from it if you examine some standard OneWorld APPL and/or UBE which use them.

Hope, could be a little help.

Regards,
Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 

jeremey_garcia

VIP Member
Zoltan & Gene,

Thank you! I'm trying these as I "speak". I will let you know the results once I have some:)


Jeremey Garcia
Xe SP14 ES - AS/400 CO - AS/400 Deploy - NT Citrix
 

jeremey_garcia

VIP Member
It worked wonderfully guys. Thanks so much. That one has now been passed amongst us three programmers here.

Jeremey Garcia
Xe SP14 ES - AS/400 CO - AS/400 Deploy - NT Citrix
 

Sef

VIP Member
Hi Jeremey,

Don't forget about the associate description function (via the EDIT menu, go to associate and select description) in FDA and RDA whenever you need a description variable populated.
In "Ye olden days" in RDA you always needed to use BSFN's or Fetch singles to retrieve all your description fields, but in XE there is a pretty good chance that your description field is retrieved correctly and no programming is required!

(Silly me, I can't remember for sure if this works on UDC's and I can't check this at the moment as I am currently at a 7.3.2 site).

By the way, I was told that the use of BSFN's (where available) is preferred over Fetching singles as Fetching singles can cause issues in a web environment.

Rgds,


Sef van den Nieuwelaar
Australia
B732 on NT, XE on NT, B732/A73 on AS400, B733 on NT
 

jeremey_garcia

VIP Member
Morning Sef,

Yes this works. I read your post, then I had to go and try it out. It works. Thank you. As a coworker just said, "let the software do what it is supposed to do"

Jeremey Garcia
Xe SP14 ES - AS/400 CO - AS/400 Deploy - NT Citrix
 
Top