Get answers.  Share knowledge.  Collaborate with peers.




Trailing the blanks which come in the middle of a string

The obvious easy way is simply to run [ EVAL MyString = %SUBST(MyString:1:5) + %SUBST(MyString:7:3) ]. But that seems too simple. You must be asking for more than that. Do you need a general routine to compress blanks out of any value in the string variable?
.
The EVAL statement is the basis of any routine. If you use variables in place of the constant digits, you can run that statement in a DO-loop. Set the variables to appropriate values each time through the loop.
.
Use %SCAN or %CHECK to locate the position of any embedded blank. Use the %TRIM functions when you want substrings that have leading or trailing blanks removed. Use %LEN to find lengths of substrings.
.
Run the DO-loop until no embedded blanks remain. That will handle cases when there is more than just a single blank in the original string.
.
Tom



View Discussion   |  April 30, 2013  11:57 PM
AS/400, RPGLE
discussed by:
TomLiotta
107,735 pts.

Need career guidance

Any sort of technical experience you can gain will likely benefit you in IT – especially if you want to focus on security. The most important thing, however, is to focus on yourself. That is fine-tune your communication skills, your networking skills, your ability to speak on your feet. I’ve written extensively about this at the following links:
http://www.principlelogic.com/careers.html
http://securityonwheels.com

Best of luck!



View Discussion   |  April 30, 2013  9:14 PM
CCNA, CCNP, Cisco, Networking careers
discussed by:
KevinBeaver
10,785 pts.

CPF5011 COBOL subfile error

Tom – There is not a good reason. But since something with the rewriting of un-modified subfile records caused me problems here, I would like to try the read next modified in this and/or my next subfile adventure.

I still don’t fully understand why resetting an indicator and rewriting the subfile record created a problem, but IT DID, so I will not be doing that again.

Thanks for your comments.



View Discussion   |  April 30, 2013  9:09 PM
AS/400, AS/400 Subfiles, COBOL
discussed by:
LetItBe
185 pts.

How do I copy a data base file to IFS directory

Can you give me an example of CPYTOIMPF to copy a file as CSV .
Thanks



View Discussion   |  April 30, 2013  9:07 PM
AS/400 - CL Command
discussed by:
ITR
35 pts.

GPO settings for WSUS not applying correctly to 2 machines

No idea why it wasn’t working right. gpupdate /force did nothing.

Restarting wuauclt on the server took care of it though.



View Discussion   |  April 30, 2013  5:19 PM
GPO Window 2008 Server, Group Policy, Server 2008R2, Windows Update, WSUS 3.0
discussed by:
Mattcassell
730 pts.

Differences between firewalls and routers

Nice replies… Guys… :-) … Here the thing is … Now a days i am getting the doubts on very basic ones…. :-)

What i supposed to do… But i am working on Firewalls and proxies only… :-)

I wants to clarify my doubts whether that is small or big…. However thanks for your replies and to your data too….. :-)



View Discussion   |  April 30, 2013  4:52 PM
Firewalls, Routers
discussed by:
yans112112
285 pts.

Differences between firewalls and routers

Hahaha agree… people now at days don’t like to read on their own. They like people to provide them with the answers without them having to do any work.



View Discussion   |  April 30, 2013  4:25 PM
Firewalls, Routers
discussed by:
MR007
20 pts.

discussed by:
mr007
20 pts.

Headphone jack on HP laptop doesn’t work

Check to see if your headphones have their own separate inline volume/mute control. I had a pair that I’d mute accidently if I leaned to close to the desk.

Check your sound settings in the control panel and make sure it looks ok. You may have a test sound feature. Lastly do you get sound thru the laptop speakers? If not you may have a damaged “sound card”. With most thing being integrated these days that’s a repair you cannot fix yourself and may be costly.



View Discussion   |  April 30, 2013  3:21 PM
headphone, HP Laptop
discussed by:
ToddN2000
3,890 pts.

Need career guidance

Career guidance is something that is asked on this site quite often. Please search the site and you will find the standard answers that are given.



View Discussion   |  April 30, 2013  11:51 AM
CCNA, CCNP, Cisco, Networking careers
discussed by:
CharlieBrowne
32,785 pts.

Trailing the blanks which come in the middle of a string

Use the %Scan instruction to find the blanks. Then use %Substr to adjust the characters in the field



View Discussion   |  April 30, 2013  11:48 AM
AS/400, RPGLE
discussed by:
CharlieBrowne
32,785 pts.

Object is currently in use

If you’ve going to modify the program you will want ”QP0LROR ” API
If you are looking for commands for operations then wrkObjLck would be the first step in the diagonstic.



View Discussion   |  April 30, 2013  10:39 AM
AS/400, AS/400 jobs
discussed by:
philpl1jb
44,070 pts.

Trailing the blanks which come in the middle of a string

u got me correct.so,the string which u assumed is hellobhaibbbbbb and i want to trail the first ‘b’ which means blank thyat comes in the position ’6′
the os version whichg we r using is v7r1



View Discussion   |  April 30, 2013  8:47 AM
AS/400, RPGLE
discussed by:
JSDHFKJHA
290 pts.

Object is currently in use

We don’t know what steps to follow because we don’t know any steps of your RBO job, nor do we know what object is locked nor what the job needs the object for.

.
The API is documented like all APIs in the Information Center. The Retrieve Object References (QP0LROR) API page tells how to call the API.
.
Tom


View Discussion   |  April 30, 2013  8:24 AM
AS/400, AS/400 jobs
discussed by:
TomLiotta
107,735 pts.

AS/400

If it’s just the basic macro code, I don’t think I’ve ever heard of a way to do it. An emulator macro shouldn’t be complex enough to need it.
.
If it’s a complex VB script, then you’d probably use a VB script debugger. You obtain those either from Microsoft or in Microsoft tool sets, or from 3rd-party suppliers. And for any of those, instructions would be different depending on the Windows OS and the particular debugging tool that you chose.
.
Tom



View Discussion   |  April 30, 2013  8:16 AM
AS/400, AS/400 macros, iSeries
discussed by:
TomLiotta
107,735 pts.

Object is currently in use

Thanks Tom,Philip for your time , failed job was restarted and it worked fine …

and I would be glad if i have a information regarding ”QP0LROR ” API what are the steps we need to follow .It would be a lot help full for me in future failures..



View Discussion   |  April 30, 2013  7:53 AM
AS/400, AS/400 jobs
discussed by:
ravula
365 pts.

Trailing the blanks which come in the middle of a string

To clarify, assume a 15 character field containing ‘hellobhaibbbbbb’ where each “b” stands for a blank. You want to cause the value to become ‘hellohaibbbbbbb’.
.
Is that correct?
.
What OS version are you needing this to run on?
.
Tom



View Discussion   |  April 30, 2013  7:36 AM
AS/400, RPGLE
discussed by:
TomLiotta
107,735 pts.

TV apps with my Netgear N300 (WNR200v4) router isn’t working

Are you trying to get a Direct TV offering through your router? Or is the “TV apps” something from somewhere else? If you need help with Pandora, contact Pandora Support or look in Pandora forums. — Tom



View Discussion   |  April 30, 2013  7:31 AM
Netgear, Netgear router, Networking
discussed by:
TomLiotta
107,735 pts.

Headphone jack on HP laptop doesn’t work

You’ll probably either need to get new headphones or to take your laptop for repairs. If it’s still under warranty, you could have the seller take care of it or send it to the appropriate repair site. — Tom



View Discussion   |  April 30, 2013  7:28 AM
headphone, HP Laptop
discussed by:
TomLiotta
107,735 pts.

Defaults the Physical file with ‘%’ for Character fields and -9999 for Numeric fields.

Both of your suggested alternatives make good sense. The choice might be determined by the exact situation.
.
Now, what exactly do you mean by “pass the file as parameter to another program”. What will be ‘passing’ the file? How are you intending to ‘pass’ it? Will you ‘pass’ from one RPG program procedure to another RPG procedure? Can you show an example of the CALLP statement and the prototype that you expect to use?
.
Tom



View Discussion   |  April 30, 2013  4:38 AM
AS/400, DB2, RPG, RPGILE
discussed by:
TomLiotta
107,735 pts.