.st0{fill:#FFFFFF;}

JBA System21 Customer Inquiry (or should that be Enquiry) 

 November 3, 2008

By  NickLitten

Prompting a list of all customers defined in Sales Ledger (or Account Receivable as its also known) is simple from within any JBA RPG program.

A call to SL016 – JBA Customer Inquiry – pops a window up, you select you customer using various subset, selection functions and it will be returned to the calling program via the *LDA

Sample RPGLE code could be:

L#CUSN is the returned customer code defined at:

D L#CUSN 482 489

And you can display the customer selection window like this:

// If customer prompt has been requested, do so.
// Note: oslsl* needs to be in *libl
ā€‹/free
 CUSN L#CUSN = CUSN??
 IF *INKD;
 Out LDA;
 Call 'SL016'; // or whatever prototype you have created to call this RPG*PGM
 In LDA;
 CUSN?? = L#CUSN; //populate the return customer number
 EndIf;

Obviously the Selected customer code is returned via *LDA variable L#CUSN (defined earlier) and in this case you can see that the window looks like this:

JBA System21 Customer Inquiry (or should that be Enquiry) 1

NickLitten


IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Shameless Trekkie, Belligerent Nerd, Englishman Abroad and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and remember: If at first you don't succeed then skydiving probably isn't a hobby you should look into.

Nick Litten

related posts:

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
__CONFIG_colors_palette__{"active_palette":0,"config":{"colors":{"cff50":{"name":"Main Accent","parent":-1},"a344d":{"name":"Accent Transparent","parent":"cff50"}},"gradients":[]},"palettes":[{"name":"Default","value":{"colors":{"cff50":{"val":"var(--tcb-skin-color-0)"},"a344d":{"val":"rgba(46, 138, 229, 0.85)","hsl_parent_dependency":{"h":210,"l":0.54,"s":0.78}}},"gradients":[]},"original":{"colors":{"cff50":{"val":"rgb(0, 178, 255)","hsl":{"h":198,"s":1,"l":0.5}},"a344d":{"val":"rgba(0, 178, 255, 0.85)","hsl_parent_dependency":{"h":198,"s":1,"l":0.5}}},"gradients":[]}}]}__CONFIG_colors_palette__

Get In Touch

Iā€™m always looking for awesome input, feedback and critique!

>