Get answers.  Share knowledge.  Collaborate with peers.




RPGLE program described files

Due to my inability to get the spacing right, I didn’t include the subroutine. Yes, it did just move the 3 fields to the new fields.

I did end up just creating the new file that will hold the set of records that I needed. I couldn’t use the CPYF command as it was important to keep the records in the order I was reading them. I also needed to change the M to an N as I was copying the records over.

I am going to try the suggestions you gave me, so I can see if that solves the problem with program described files.

Thanks everyone!

I will try



View Discussion   |  April 8, 2012  3:03 PM
iSeries RPGLE, RPGLE Program
discussed by:
pt0505
140 pts.

Store and retrieve data in UTF-8 on SQL Server 2005

How do I tell SQL Server 2005 to support more than one language for storing and retrieving data?



View Discussion   |  April 8, 2012  3:48 AM
SQL Server 2005, UTF-8
discussed by:
ruru1314
20 pts.

Windows 7 Pro PCs are not pinging to 2003 DC

…windows 7 clients which are not communicating to a 2003 DC.

There appear to be various difficulties getting Win 7 clients properly connected to a Win 2003 domain. Review Windows 7 clients on 2003 domain / group policy and Windows Small Business Server 2003: Windows 7, Windows Vista and Outlook 2007 compatibility update for example areas to investigate.

Tom



View Discussion   |  April 8, 2012  3:25 AM
2003 DC, Windows 7 Client
discussed by:
tomliotta
107,695 pts.

RPGLE program described files

…just do a CPYF command…

I’d suspect the subroutine MOVEREC simply moves the three input fields to the output fields. But without seeing the code, it’s just a guess.

…records with RECTYP = “H”

And do what with records with RECTYP = “N”?

Tom



View Discussion   |  April 8, 2012  3:07 AM
iSeries RPGLE, RPGLE Program
discussed by:
tomliotta
107,695 pts.

Unable to connect to AS/400 server

I have downloaded as400 emulator TN5250 (free trial version).

It might help if you told us which TN5250 emulator you’re using.

Tom



View Discussion   |  April 8, 2012  2:58 AM
AS/400 connection error, AS/400 Emulator
discussed by:
tomliotta
107,695 pts.

RPGLE program described files

Your EXCEPT lines are specifying a file name not a output exception name.
Try EXCEPT ADD.

Better yet delete this crappy pgm and just do a CPYF command and select only records with RECTYP = “H”



View Discussion   |  April 7, 2012  8:34 PM
iSeries RPGLE, RPGLE Program
discussed by:
coderhal
350 pts.

Windows 7 Pro PCs are not pinging to 2003 DC

I have degraded one of the PCs to XP and it is communicating to DC. So it is the problem with windows 7 OS .Other 3 PCs are still having the problem. Can any body suggest?



View Discussion   |  April 7, 2012  10:22 AM
2003 DC, Windows 7 Client
discussed by:
gupthanpg
60 pts.

LAN Technolgy

Gigabit ethernet.



View Discussion   |  April 7, 2012  9:38 AM
LAN, lan technology
discussed by:
patrickscott12
95 pts.

Ethernet Network

I agree with amigus.



View Discussion   |  April 7, 2012  9:35 AM
Networking
discussed by:
patrickscott12
95 pts.

How to connect my computer to SQL server 2005

I’m pretty sure he’s looking for sample code to connect an application to a database. If this is the case we’ll need to know what language you are writing the application in so we can point you in the right direction.



View Discussion   |  April 7, 2012  4:47 AM
SQL Server, SQL Server 2005
discussed by:
mrdenny
64,505 pts.

Windows 7 Pro PCs are not pinging to 2003 DC

Cables and switch ports are checked. I am trying to degrade Windows 7 to XP today. there are 4 PCs having issues (differnt hardware ,Lenova,Dell HP). All the PCs are communicating to other network drives. Server is already accessing by around 30 clients. Please advice.



View Discussion   |  April 7, 2012  4:43 AM
2003 DC, Windows 7 Client
discussed by:
gupthanpg
60 pts.

Is an MCSE or a CCNP degree more valuable to an employer?

In the world where we live in any one can be an IT geek as long as he wish but in the organization where competition is the situation, specialization is the matther here. In the room before you walk in for your interview might be you MCSE or CCNP would be the certs that talk for you and offcourse that definitely does it all.



View Discussion   |  April 7, 2012  12:32 AM
CCNP, Cisco, Cisco certifications, economy, IT jobs and career development, jobs, MCSE, Microsoft, Microsoft certifications, Networking, Networking certifications
discussed by:
patrickscott12
95 pts.

FTP- options for receiving files

When I mget 20120405*.csv, I get:

Path already exists: /home/tms/20120405-103602_LoadMaster_040512103326.csv
Specify REPLACE as a subcommand option.      

How much of the pathname/filename is checked on the IFS? The whole name is unique but the first 19 characters are the same as existing files on the IFS.



View Discussion   |  April 6, 2012  9:55 PM
AS/400 FTP, AS/400 v5r4
discussed by:
nickhutcheson1
1,380 pts.

FTP- options for receiving files

Well, the rename is not exactly right.
The server said RNFR not correct. My believe is that it does not like the ‘*’. It seems like the tofile (RNTO) would need to be the whole name of the file ‘ 20120405etc_and_so_on.prx’. I haven’t found any examples on the rename command.
Interactively, I typed rename and hit enter. The server asked for the fromfile name, then the tofile name. It still did not like the ’20120405*.csv’ as the from file name. Maybe rename just will not accept generics.
This will keep me from bringing in all files in the folder each day. I would still love to rename as I pull them (just to prove that I can).

BigKat, I did have a pgm to update the script for the put operation. I copied/changed for the get operation. thx.



View Discussion   |  April 6, 2012  9:51 PM
AS/400 FTP, AS/400 v5r4
discussed by:
nickhutcheson1
1,380 pts.

SQL Update not Working using two files

UPDATE VINITMB A
SET (a.IFOTH) = (SELECT coalesce (B.IGCOST,0)
FROM ITEMVND1 B
WHERE A.IFITEM = B.IGITEM AND A.ifloc = B.IGLOC AND A.IFDIV = ‘116′)
WHERE EXISTS
(SELECT 1 FROM ITEMVND1 B where b.IgITEM = a.IfITEM AND b.igloc = A.IFLOC)

The UPDATE needs two WHERE clauses.

The first WHERE clause needed will be the one that determines which rows to update. For example:

UPDATE VINITMB A
SET (a.IFOTH) = 'NewVal'
WHERE EXISTS
(SELECT 1 FROM ITEMVND1 B where b.IgITEM = a.IfITEM AND b.igloc = A.IFLOC)

I replaced the subselect with a basic value assignment. I have no idea if it’s a valid value; it merely represents the concept.

The WHERE clause should now be limiting the updated rows only to the rows you need. For this, you could use a SELECT instead of an UPDATE:

SELECT * FROM VINITMB A
WHERE EXISTS
(SELECT 1 FROM ITEMVND1 B where b.IgITEM = a.IfITEM AND b.igloc = A.IFLOC)

The selected rows will show you which ones would be updated if you put that WHERE clause on the UPDATE. If the wrong rows are listed, then keep modifying the WHERE clause until the right result set is defined.

Once that works, you can work on the next WHERE clause.

That one needs to return exactly one value for each row in the result set. There should be no null values returned. Again you could use a SELECT to verify that conditions will work. Maybe something like:

SELECT
 A.IFITEM,
 A.ifloc,
 A.IFDIV,
 a.IFOTH,
 (SELECT coalesce (B.IGCOST,0)
   FROM ITEMVND1 B
   WHERE A.IFITEM = B.IGITEM AND A.ifloc = B.IGLOC AND A.IFDIV = ‘116′) as MyCost
 FROM VINITMB A
 WHERE EXISTS
  (SELECT 1 FROM ITEMVND1 B where b.IgITEM = a.IfITEM AND b.igloc = A.IFLOC)

I don’t know how many unique values there are in your files nor how they match up between your files, so I don’t know what will work. But I do know that you can’t have a successful update until you narrow both WHERE clauses down to give correct results.

It’s a lot safer to test with SELECT, and results are far more visible.

Tom



View Discussion   |  April 6, 2012  9:36 PM
AS/400, AS/400 SQL, SQL, SQL Server, SQL Server Updates
discussed by:
tomliotta
107,695 pts.

MochaSoft TN5250 with AS/400

error cpf1120- user xxxxx does not exist.
i give the correct user id and password

If you get CPF1120 with that appropriate text, then you are reaching some AS/400 and the user profile that you entered does not exist on that AS/400.

There’s no way for us to tell if you’re reaching the correct AS/400.

Tom



View Discussion   |  April 6, 2012  8:51 PM
AS/400 administration, MochaSoft, Telnet 5250, TN5250
discussed by:
tomliotta
107,695 pts.

FTP- options for receiving files

Here is what I came up with. …

If only read authority exists, your two-part FTP solution was pretty much what came to mind for me.

Tom



View Discussion   |  April 6, 2012  8:43 PM
AS/400 FTP, AS/400 v5r4
discussed by:
tomliotta
107,695 pts.

FTP- options for receiving files

CharlieBrown,
How do you know the file name to rename inside the ftp session?
mget 20120406*.csv
rename 20120406*.csv 20120406*.PRX <<<<would this work?

Kinda a combination of both suggestions.
Nick



View Discussion   |  April 6, 2012  8:16 PM
AS/400 FTP, AS/400 v5r4
discussed by:
nickhutcheson1
1,380 pts.

FTP- options for receiving files

CharlieBrown, Bigkat – thanks for the prompt response.
I doubt I have anything but ‘read’ authority on their server. I could try that. That would be a good way.

Bigkat, not sure yet how often this will run. Most likely once a day, late at night for the current day. A guy here had also come up with that (20120406*.csv) plan.

Here is what I came up with.
Two connections.
First- connect, dir, quit. Read through the ftp log, parse the filename, chain out to a file with all previously downloaded filenames. If not found(we haven’t downloaded it before), update/write a different script file with the new-exact file name to get.
Second- connect, get new files, quit. Read the ftp log, parse the filenames, add them to the file with previously downloaded file names.

Then I can kickoff the conversion programs to build db files we can use.
I think it is a plan, just had to think on it a bit.
How does that sound?

You two probably have the easier way and less coding now that I think about it. I will check on the rename authority. If not, I will use the current date to change the script file.



View Discussion   |  April 6, 2012  8:09 PM
AS/400 FTP, AS/400 v5r4
discussed by:
nickhutcheson1
1,380 pts.

FTP- options for receiving files

how often does this run???

if daily, you could mget 20120406*.csv
or even hourly, mget 20120406-14*.csv

you would need to have a process update the control script file before you start the FTP session



View Discussion   |  April 6, 2012  6:57 PM
AS/400 FTP, AS/400 v5r4
discussed by:
bigkat
7,175 pts.