Saturday, April 18, 2009

Archives of Discussion forum from our old site


DISCUSSION FORUM
Displaying 1 - 81 of 81 total posts.


::Post/Reply Query::

submitted on February 2, 2009 6:28 AM EST
Name:
v
Email Address:

Subject/Topic

Query/Response(use.comment field for extra space)

Additional Comments(if required)


submitted on February 2, 2009 4:57 AM EST
Name:
vijetha
Email Address:
vijetha_kadapala@mindtree.com
Subject/Topic
Sorting array data structure
Query/Response(use.comment field for extra space)
Hi, I have defined an array data structure with 3 fields D ds D ArrVat 33 2 dim(999) D VatPrc 11 2 overlay(Arrvat:1) D VatAmt 11 2 overlay(Arrvat:*next) D VatTot 11 2 overlay(Arrvat:*next) I want to sort the data structure with VAT percentage which is the first field defined in the data structure. I tried using sorta and the array name…it is not working - it is making the entire array as blanks I tried ascend keyword next to array name, this also is not working. If anybody has any idea, can you please help me out with this.
Additional Comments(if required)


submitted on December 11, 2008 6:59 AM EST
Name:
Rajendranath
Email Address:
m.rajendranath@bharti-axagi.co.in
Subject/Topic
WRKQRY
Query/Response(use.comment field for extra space)
Dear VVN Murthy Can I do substring in timestamp field in WRKQRY, I need to truncate the field, pleas advice
Additional Comments(if required)


submitted on November 8, 2008 10:14 AM EST
Name:
Rajendranath
Email Address:
m_rajendranath@yahoo.com
Subject/Topic

Query/Response(use.comment field for extra space)
Dear VLN, Congrats! hope you reach more heights in near future
Additional Comments(if required)


submitted on October 31, 2008 4:05 PM EST
Name:
Murty Varanasi
Email Address:
vvnmurty@rediffmail.com
Subject/Topic
VL Narasimham’s message
Query/Response(use.comment field for extra space)
VLN, Thanks for your email. First of all congrats. on your elevation. It’s really a great achievement during the crisis time, when entire world markets (financial, IT and all sectors) are going down - it is only the REAL WORTH that would be recognized now. Keep it up.
Additional Comments(if required)


submitted on October 27, 2008 2:32 AM EST
Name:
narasimham
Email Address:
vlnarasimham@gmail.com
Subject/Topic
*** HAPPY DEEPAVALI ***
Query/Response(use.comment field for extra space)
Hello All,May the festival of lights be the harbinger of joy and prosperity. As the holy occasion of Diwali is here and the atmosphere is filled with the spirit of mirth and love, here’s hoping this festival of beauty brings your way, bright sparkles of contentment, that stay with you through the days ahead. Best wishes on Diwali.
Additional Comments(if required)
Wishing you & your family a happy Deepavali.

submitted on October 24, 2008 10:06 AM EST
Name:
narasimham
Email Address:
vlnarasimham@gmail.com
Subject/Topic
Thanks to Friends400
Query/Response(use.comment field for extra space)
Dear Friends, I have been promoted to a higher level in my organization and in this happy moment, i would like to thank all the friends400 members for contributing in updating my knowledge through this site and Especially to Soumendra and Murty.
Additional Comments(if required)
hope this site will help a lot more guys in the future in attaining higher grades in professional life as well as in personal life.

submitted on October 24, 2008 10:00 AM EST
Name:
na
Email Address:

Subject/Topic

Query/Response(use.comment field for extra space)

Additional Comments(if required)


submitted on October 14, 2008 1:10 PM EST
Name:
Soumendra Mishra
Email Address:

Subject/Topic
Reply to Paul Query
Query/Response(use.comment field for extra space)
Hi Paul, I hope your problem was with EDTCDE.Try with EDTCDE(J) that may work. thanks, soumendra
Additional Comments(if required)


submitted on October 7, 2008 3:34 AM EST
Name:
Rajendranath
Email Address:

Subject/Topic
XML Into
Query/Response(use.comment field for extra space)
Oh, sorry, I missed
Additional Comments(if required)


submitted on October 5, 2008 9:38 PM EST
Name:
Murty Varanasi
Email Address:
vvnmurty@rediffmail.com
Subject/Topic
query on xml into
Query/Response(use.comment field for extra space)
Rajendra, I am talking about the usage of the new software called “xml into”.
Additional Comments(if required)


submitted on October 4, 2008 1:32 AM EST
Name:
Rajendranath
Email Address:
m.rajendranath@bharti-axagi.co.in
Subject/Topic
XML
Query/Response(use.comment field for extra space)
Dear Murty, Currently I am using Business Objects to put the data into XML. I am extracting the data into Excel via Query400 and importing into XML. But I couldnt find any way to import directly into XML from RPG output
Additional Comments(if required)


submitted on September 28, 2008 5:01 AM EST
Name:
Rajendranath
Email Address:
m_rajendranath@bharti-axagi.co.in
Subject/Topic

Query/Response(use.comment field for extra space)
Dear Murty, I am also trying into put in XML, couldnt, please do let me know if you find anything, Dear All, Can anyone help us in this regard
Additional Comments(if required)


submitted on September 26, 2008 4:25 PM EST
Name:
Murty Varanasi
Email Address:
vvnmurty@rediffmail.com
Subject/Topic
Any ideas on using “XML-INTO” in an RPG pgm.
Query/Response(use.comment field for extra space)
Has anybody used XML-INTO in an RPG program. If yes, shall be grateful if some examples can be posted in this forum or emailed to me AS SOON AS POSSIBLE. Thanks Murty
Additional Comments(if required)


submitted on September 22, 2008 4:55 AM EST
Name:
Paul Flynn
Email Address:
ppflynn@yahoo.com
Subject/Topic
Leading Zero not printing
Query/Response(use.comment field for extra space)
When running a French Payroll System (Anael Paie) on a UK AS400, Leading Zeros aren’t printed. i.e. ‘0.756′ prints as ‘ .756′. Why is this?
Additional Comments(if required)


submitted on September 13, 2008 3:42 PM EST
Name:
Murty Varanasi
Email Address:
friendindeed@friends400.com
Subject/Topic
This is meant for ReethiPrasad(new member) — Can you pl send your email for our records.
Query/Response(use.comment field for extra space)
Name Reethi Email(this will be your userid) reethi.prasad Date of Birth 05/10/1982 Phone(s) Company(enter NA if not interested to disclose) NA Qualifications/Technology Bachelor of Engineering(AS400) Work Experience(No.of yrs/brief details) 1 year
Additional Comments(if required)


submitted on September 13, 2008 3:37 PM EST
Name:
vvnmurty
Email Address:
vvnmurty@rediffmail.com
Subject/Topic
reply to VL Narasimham’s query.
Query/Response(use.comment field for extra space)
If you declare the field in Output-mode, then you should be bale to get the desired function. (by selecting F4). — May be you will have to play some trick to position the cursor with a Row+Line positioning, so that f4 can be taken there.
Additional Comments(if required)


submitted on September 12, 2008 9:19 AM EST
Name:
vlnarasimham
Email Address:
vlnarasimham@gmail.com,
Subject/Topic
Preventing the user from keying in an input field
Query/Response(use.comment field for extra space)
Hello Friends, I have a display file consisting of 4 input fields(FLD1,FLD2,FLD3,FLD4). For one of the fields say FLD3, i need to protect it from the user by directly keying on the field and entering the values. There should be only one way in which the user can enter value to this field and that is by pressing F4 on the field and choosing the value from a drop down list. Any idea on this, I tried by protecting the field and turning off the indiactor when F4 is pressed, but the problem is the cursor is not making progression to this field. Need help.
Additional Comments(if required)


submitted on September 5, 2008 3:28 PM EST
Name:
Murty Varanasi
Email Address:
vvnmurty@rediffmail.com
Subject/Topic
Reply to M.Rajendranath’s query on incremental save
Query/Response(use.comment field for extra space)
1. Your concept of CRTSAVF is good to increment the Savefile number i.e., to build the savefile dynamically on the fly by concatenating Libname + current date etc. 2. In addition, only the FIRST TIME SAVE you should take a SAVLIB (i.e., entire library will be saved). - you may use this from commandline itself instead of a pgm. 3. Next time onwards you should use SAVCHGOBJ (Save Changed Objects) command. You have to specify the relevant parameters in it, like the library name, and the date. (normally the library originally saved date will be taken by default). The incremental back-up will happen from the date the library was originally backed up. NOTE: If you specify the lib-saved date, ensure that no-other process is backing up the library i.e., if you write a pgm. for incremental back up and some other pgm. takes a SAVLIB on the same library, your incremental backup may not get any objects due to this latest SAVLIB command used by the other pgm. Alternatively, you can specify a date from when you need the incremental back up. This date can be currentdate minus 1 etc. passed as a CL parameter.
Additional Comments(if required)


submitted on September 5, 2008 2:05 PM EST
Name:
Murty Varanasi
Email Address:
vvnmurty@rediffmail.com
Subject/Topic
SQL Statement using MULTIPLE-Case When
Query/Response(use.comment field for extra space)
SELECT REGION, ITEM , COST2-OCST2 AS UNIT_COST, CASE WHEN ITM_FILE.XUNPR1 > 0 AND ITM_FILE.XUNPR2 = 0 AND ITM_FILE.XUNPR3=0 AND ITM_FILE.XUNPR4=0 THEN ITM_FILE.XUNPR1 WHEN ITM_FILE.XUNPR1 = 0 AND ITM_FILE.XUNPR2 = 0 AND ITM_FILE.XUNPR3>0 AND ITM_FILE.XUNPR4 =0 THEN ITM_FILE.XUNPR3 WHEN ITM_FILE.XUNPR1 = 0 AND ITM_FILE.XUNPR2 > 0 AND ITM_FILE.XUNPR3=0 AND ITM_FILE.XUNPR4 =0 THEN ITM_FILE.XUNPR2 WHEN ITM_FILE.XUNPR1 = 0 AND ITM_FILE.XUNPR2 = 0 AND ITM_FILE.XUNPR3=0 AND ITM_FILE.XUNPR4 >0 THEN ITM_FILE.XUNPR4 WHEN ITM_FILE.XUNPR1 = 0 AND ITM_FILE.XUNPR2 = 0 AND ITM_FILE.XUNPR3=0 AND ITM_FILE.XUNPR4 =0 THEN 0 END AS RETAIL_PRICE FROM ITM_FILE, FILE2 WHERE IREGION=XREGION AND ititm#=XVitm# and REGION=’ABC’
Additional Comments(if required)
thought the above will be useful to our friends.

submitted on September 3, 2008 8:15 AM EST
Name:
M Rajendranath
Email Address:

Subject/Topic
Daily Backup
Query/Response(use.comment field for extra space)
Hi All, I need to take backup of a library everyday, I need to increment the save file name every time I execute the CL program. FYI: I am using CRTSAVF and SAVOBJ for taking backup, your inputs please
Additional Comments(if required)
No specifc it can be CL or PGM

submitted on August 27, 2008 4:14 AM EST
Name:
Lekha
Email Address:
lekhasingh@rediffmail.com
Subject/Topic
Cool APIs CEEDATE and CEEDAYS for date formating
Query/Response(use.comment field for extra space)
Hello friends below is a nice link for Dateformating in rpgle(Exceptionally for wordy date formating like 27-AUG-2008 etc…).Now no need to mess up with Compile time arrays and %Subst etcc.. you can convert any date format to any other with this
Additional Comments(if required)
http://systeminetwork.com/article/wordy-date-formatting

submitted on August 26, 2008 9:34 AM EST
Name:
Narasimham
Email Address:
vlnarasimham@gmail.com
Subject/Topic
Look before you %Lookup
Query/Response(use.comment field for extra space)
Just read how %Lookup works faster than Lookup opcode on sequential arrays http://www.ibmsystemsmag.com/i5/december02/enewsletterexclusive/8276p1.aspx
Additional Comments(if required)
Regards Narasimham

submitted on August 17, 2008 8:22 AM EST
Name:
Asuthosh
Email Address:
s.asutosh@rediffmail.com
Subject/Topic
Reply to Lekha’s query on SQL cursor
Query/Response(use.comment field for extra space)
Hello Lekha, While compiling the SQLRPGLE program set the following parameters as shown below CLOSQLCSR(*ENDMOD)
Additional Comments(if required)


submitted on July 28, 2008 2:24 AM EST
Name:
lekhasree
Email Address:
lekhasingh@rediffmail.com
Subject/Topic
Reg. SQL cursor
Query/Response(use.comment field for extra space)
Hello all, How to close an SQL cursor from outside the program.I am opening cursor in the program but if any abnormal termination occurs,iam unable to close that from outside the program.
Additional Comments(if required)
Thanks, Lekha

submitted on July 22, 2008 10:19 AM EST
Name:
Ashutosh
Email Address:
s.asutosh@rediffmail.com
Subject/Topic
Reg SEU color
Query/Response(use.comment field for extra space)
wow can we change it using SQL400, then iam eagerly waiting for murty’s reply
Additional Comments(if required)
regards Asutosh.

submitted on July 22, 2008 7:00 AM EST
Name:
soumendra mishra
Email Address:
som_som78@rediffmail.com
Subject/Topic
SEU color change
Query/Response(use.comment field for extra space)
Thanks, ashutosh.this really good but I think there is way to change the color through SQL400 also.Mr Murty had told me once this.Murty if you are free can you reply.
Additional Comments(if required)


submitted on July 21, 2008 9:33 AM EST
Name:
Ashutosh
Email Address:
s.asutosh@rediffmail.com
Subject/Topic
further clarification to som’s query
Query/Response(use.comment field for extra space)
Hi, Som in the below list i have separated each hexadecimal details with symbol. please go through accordingly
Additional Comments(if required)
Regards Asutosh

submitted on July 21, 2008 9:29 AM EST
Name:
Ashutosh
Email Address:
s.asutosh@rediffmail.com
Subject/Topic
Reg. Som’s query on SEU colors
Query/Response(use.comment field for extra space)
Here is a list of hexadecimal values apl 23 (Ctl-W = White Bkgd) apl 22 (Alt-W = White Font) apl 29 (Ctl-R = Red Bkgd) apl 28 (Alt-R = Red Font) apl 31 (Ctl-T = Turquoise Bkgd) apl 30 (Alt-T = Turquoise Font) apl 33 (Ctl-Y = Yellow Bkgd) apl 32 (Alt-Y = Yellow Font) apl 39 (Ctl-P = Pink Bkgd) apl 38 (Alt-P = Pink Font) apl 21 (Ctl-G = Green Bkgd) apl 20 (Alt-G = Green Font) apl 3b (Ctl-B = Blue Bkgd) apl 3a (Alt-B = Blue Font) apl 20 (Alt-Enter = Green Font)
Additional Comments(if required)
If you are using the client access,1)Click the button “remap keyboard functions” button in the tool bar,2)Click on the key “R” 3)Now in the space against Alt,enter apl 28 4) save the changes. Now in the seu editor if you type Alt+R against a columan and press enter, the entire line will appear in red color. let me know whether this can help you. Regards Ashutosh

submitted on July 21, 2008 1:38 AM EST
Name:
Soumendra Mishra
Email Address:
som_som78@rediffmail.com
Subject/Topic

Query/Response(use.comment field for extra space)
hi , I want to change the color of my RPG code.by default it is showing green.Can I change it to Red or white.I know there is some hexadecimal code for each color.We can use that hexadecimal code to chnage the color. Can anybody tell me how to do it?And where can I get what is the hexadecimal codes for each colors. thanks, soumendra
Additional Comments(if required)


submitted on July 19, 2008 5:58 AM EST
Name:
M Rajendranath
Email Address:
m.rajendranath@bharti-axagi.co.in
Subject/Topic
FTP
Query/Response(use.comment field for extra space)
Hi, Till now I was doing SAVF option only, every time I need to do entire process, thats the reason for doing direct FTP
Additional Comments(if required)


submitted on July 15, 2008 9:21 AM EST
Name:
anil
Email Address:
kanil354@gmail.com
Subject/Topic
as400
Query/Response(use.comment field for extra space)
I should design a PF in which we should be able to insert records into a PF but we should not be able to modify any records? How can we achieve that?
Additional Comments(if required)


submitted on July 15, 2008 9:19 AM EST
Name:
anil
Email Address:
kanil354@gmail.com
Subject/Topic
as400
Query/Response(use.comment field for extra space)
PF1 is having 3 LF’s and LF1 is having 5 key fields and LF2 is having 4 key fields and LF3 is having 3 key fields, which will u compile first and why?
Additional Comments(if required)


submitted on July 15, 2008 9:17 AM EST
Name:
anil
Email Address:
kanil354@gmail.com
Subject/Topic
as400
Query/Response(use.comment field for extra space)
PF1 is having 2 LF’s LF1 & LF2, LF2 is having unique keyword associated with it, and if u are trying to insert a duplicate record into a PF? What happens and what is the error which u get?
Additional Comments(if required)


submitted on July 13, 2008 11:26 AM EST
Name:
Shakthi Kumar
Email Address:
Kumar75@gmail.com
Subject/Topic
M.Rajendranath’s query on FTP
Query/Response(use.comment field for extra space)
In my opinion, i think it is something to do with the versions of the as400 between the source system and the target system. Why don’t you try like this. Before ftp’ing it, just make a SAVOBJ with the *previous (or whatever is the target as400) and then create a savefile. FTP the savefile. Your target system team can restore the savefile. It should work, since I also faced same issues sometime back. If both your source and target systems are having same versions, then you will have to dig further to know the root cause. Let me know if u r successful either with my suggestion or with any other process since the issue looks typical and is interesting.
Additional Comments(if required)


submitted on July 12, 2008 5:04 AM EST
Name:
M Rajendranath
Email Address:
m.rajendranath@bharti-axagi.co.in
Subject/Topic
FTP
Query/Response(use.comment field for extra space)
Dear All, I am try to FTP a file (Qry400 output) to another AS400 server, but after transfering when I try to execute the files- its is giving junk values or flat file that also junk values, please help me out in soving the FTP issue
Additional Comments(if required)


submitted on July 11, 2008 8:11 PM EST
Name:
MURTY VARANASI
Email Address:
friendindeed@friends400.com
Subject/Topic
beware of some important Free format RPGLE coding issues
Query/Response(use.comment field for extra space)
A realtime issue that occured today with a best of friend of mine: In the OPM RPG, to chain a file, the keyfield length and the work-field length in the pgm. should EXACTLY MATCH. Otherwise the pgm. will not be even compiled. But in the RPGLE-freeformat coding, it is not checking the lengh. e.g. Chain(Work_Employee_Name) EMPPFP (work-employee-name is a 100 char. field; whereas the file is keyed with EMPNAME as 50 char. The pgm. got compiled, but in the run time, it was not giving the expected results. (this employee file feed had come to us as interface from some company in a flat file format). Thought this info. is useful for our other friends in the group. You can also try this and see if you also experienced the same issue. The acid test is if the pgm. gets compiled with the mismatched fields, that is enough to kill us with debug later for production issue. Any comments/suggestions to overcome this will be highly appreciated. (not a suggestion to create the workfield like the emp.name etc. but looking for a realistic solution. We know one of the ways is %KDS, but if it is a single key field, just chain (field) should suffice.
Additional Comments(if required)
I just used today in my office work, without searching too much google; one of the suggestions given by Lakshminarasimham in this forum, about the version number retrieval. It worked well. Thanks to Lakshmi. I was trying to savobj with an older version, and wanted to know my current version of as400.

submitted on July 10, 2008 8:58 AM EST
Name:
Deeraj
Email Address:
deeraj@hotmail.com
Subject/Topic
reg. file with max rec length
Query/Response(use.comment field for extra space)
Thanks to Sreekar and Lekha for their valueble suggestions. I got my problem solved
Additional Comments(if required)


submitted on July 10, 2008 8:24 AM EST
Name:
lekha
Email Address:
lekhasingh@rediffmail.com
Subject/Topic
reply to sreekar’s answer
Query/Response(use.comment field for extra space)
wow sreekar, superb.with this you will get the answer in few secs. Deeraj just follow Sreekars’ answer it is so simple and fast.
Additional Comments(if required)
Regards Lekhs

submitted on July 10, 2008 8:09 AM EST
Name:
sreekar
Email Address:
ss.sreekar@rediffmail.com
Subject/Topic
Reply to Deeraj’ squery on file with max.rcd length
Query/Response(use.comment field for extra space)
Hi, Deeraj start an SQL section and try the below query SELECT DBNAME,NAME, RECLENGTH FROM SYSTABLES WHERE RECLENGTH = (SELECT MAX(B.RECLENGTH) FROM SYSTABLES B)
Additional Comments(if required)
you will get a list of LIBRARY, FILE and RECORDLENGTH in few secs.

submitted on July 10, 2008 7:08 AM EST
Name:
lekha
Email Address:
lekhasingh@rediffmail.com
Subject/Topic
reply to Deeraj’s query
Query/Response(use.comment field for extra space)
Hello Deeraj One solution is to create an OUTFILE for the command DSPFD over all files in the system with parameter TYPE(*RCDFMT) and then make a query on the file
Additional Comments(if required)
to find the file with largest record length use the following SQL query on the outfile. SELECT RFFILE,RFLEN FROM FRLIB/FRFILE WHERE RFLEN IN (SELECT MAX(RFLEN) FROM FRLIB/FRFILE) where FRLIB/FRFILE is the outfile created by DSPFD command. but it is a lengthy process as the DSPFD command takes lot of time to create the outfile over all the files in the system. Let’s see whether any of our member can suggest a simple solution

submitted on July 10, 2008 6:08 AM EST
Name:
Deeraj
Email Address:
deeraj@hotmail.com
Subject/Topic
file with max. record length
Query/Response(use.comment field for extra space)
Hello friends, How to identify the file with largest record length in the system
Additional Comments(if required)
thanks deeraj

submitted on July 7, 2008 7:14 AM EST
Name:
Arvind
Email Address:
Araj@hotmail.com
Subject/Topic
MQ Series and WSDS
Query/Response(use.comment field for extra space)
Hello Guys, Since I am getting the required information from this site and find it very much useful, thought I should use this forum only when compared to other forums. Can anybody let me know the steps for MQSeries. I know there are fixed APIs in AS400 for these. But a sample code will help me on: 1. Connect MQ 2. Open Queue - I believe there are some open parameters here like Open for read only, inquire only, write only etc. 3. MQ Put / MQPUT1 /MQ Get 4. MQ Close 5. MQ Disconnect Any other details on creating the Q Manager, Queues, remote queues, deadletter queues, model queues, local queues. Establishing Channels.
Additional Comments(if required)


submitted on July 7, 2008 6:23 AM EST
Name:
Arvind
Email Address:
araj@hotmail.com
Subject/Topic
SQL Stored Procedures and Data Description Language
Query/Response(use.comment field for extra space)
Can anybody throw some light on how to use SQL stored procedures from AS400 to connect to .net or vb. A detailed step-by-step process will help me attend an interview this week. How does the ODBC/JDBC connectivity work from AS400. What are the differences between SQL Stored procedures and the ODBC and JDBC connectivities. Are there any other types connectivities anybody is familiar with. sorry, I included total 3 queries in this mail itself.
Additional Comments(if required)


submitted on July 7, 2008 6:20 AM EST
Name:
Arvind
Email Address:
Araj@hotmail.com
Subject/Topic
Thanks Sreekar, but need some more details
Query/Response(use.comment field for extra space)
Thank u sreekar. I know embedded sequel. Can you let me know an example of a full sql statement for dynamic sql, say from a front-end screen, user will select a file and some field(s) on his own. The file(s) and the field(s) both are dynamic. Will we give a subselection or file.a and file.b and file.c where a.file.fielda = b.file.fieldb and a.file.fielda = c.file.fieldc. pl let me know which is preferrable.
Additional Comments(if required)


submitted on July 7, 2008 5:41 AM EST
Name:
harish
Email Address:
harish.dandu@yahoo.co.in
Subject/Topic
How to close SQL cursor
Query/Response(use.comment field for extra space)
Hi, How to close SQL cursor outside the pgm.I have a pgm where iam opening an SQL cursor.But due to some error the program is crashing without closing the Cursor. But when i ran the pgm second time it is throwing -00000502 error indicating that cursor is already open.how to solve this?
Additional Comments(if required)
regards harish

submitted on July 7, 2008 3:20 AM EST
Name:
Sreekar
Email Address:
ss.sreekar@rediffmail.com
Subject/Topic
Reply to Arvind’s query on dynamic SQL
Query/Response(use.comment field for extra space)
Hello Arvind, First of all let me know are you aware of using Static SQL in your SQLRPGLE program.If you are aware of this you can easily use Dynamic SQL.The only diff. is that, this time we will first prepare an SQL statement in a host variable and using EXECUTE IMMEDIATE statement we will execute that command. If you doesn’t know how to use Static SQL then please let me know so that i can explain the process in a more elaborated way.
Additional Comments(if required)
Thanks Sreekar

submitted on July 5, 2008 3:05 PM EST
Name:
Arvind
Email Address:
araj@hotmail.com
Subject/Topic
Dynamic SQL
Query/Response(use.comment field for extra space)
Dear Friends, I am interested to know the dynamic sql details. Can anybody respond what is the syntax for the dynamic sql.
Additional Comments(if required)


submitted on July 2, 2008 6:50 AM EST
Name:
MURTY
Email Address:
friendindeed@friends400.com
Subject/Topic
file updates thru odbc - query from raj
Query/Response(use.comment field for extra space)
1. Either the file size might be full. 2. Or the authorities on the file are changed. 3. If by any chance any triggers (journalling) is there on the PF need to look into. ODBC doesn’t require the journalling, but if it is there need to ensure that it is properly pointed to the correct journal/journal receivers. 4. File might be locked up in AS400 for some EOD jobs etc. for system saves/backups. Or some pgms. in AS400 might be running giving an exclusive lock on the file; at the same time ODBC might be trying to insert the records. Except the journalling issue, all others can occur commonly. Journalling issue can be verified, if no issues in the other points.
Additional Comments(if required)


submitted on July 2, 2008 5:37 AM EST
Name:
M Rajendranath
Email Address:
m.rajendranath@bharti-axagi.co.in
Subject/Topic
Error
Query/Response(use.comment field for extra space)
Hi, while uploading data from access to AS400, its throwing error ‘FILE NOT VALID FOR OPERATION’ I checked the ODBC connection, file in the lib, all are fine but i am getting the error, can anyone please help me in this regards
Additional Comments(if required)
Error shown: ODBC-insert on a linked table ‘TEMPLIB_ZYAMPF FAILED #7008 IBM iseries Access ODBC

submitted on July 1, 2008 8:46 PM EST
Name:
nancy
Email Address:
nancy@aol.com
Subject/Topic
level identifier on a file
Query/Response(use.comment field for extra space)
Guys/Gals, one can overcome most probably, the record level identifier issue by compiling the object as level check *no. I never tried it but read it in theory, Would anybody mind trying it and see whether this suggestion is useful.
Additional Comments(if required)


submitted on July 1, 2008 7:32 AM EST
Name:
Narasimham
Email Address:
vlnarasimham@gmail.com
Subject/Topic
Reply to Leka’s query
Query/Response(use.comment field for extra space)
Hello Lekha, The record level identifier(Also called Format level identifier) is the one through which a HLL program(Like RPG) identifies a file.Generally it will be a 13 character Hexa decimal value.To view the record level identifier of a file use the command DSPFD and look at the record format list. This identifier will change every time we change the file format(Like adding a new field,changing the attribute of a field etc..) When this identifier associated with the file changes,Running the HLL program would result in LEVEL CHECH ERROR.To overcome this you have to again compile the program
Additional Comments(if required)
Thanks, Narasimham

submitted on July 1, 2008 5:08 AM EST
Name:
Lekhasree
Email Address:
lekhasingh@rediffmail.com
Subject/Topic
Recordlevel identifier
Query/Response(use.comment field for extra space)
Hello all, Can anybody tell me what is a record level identifier,how it changes and the impact on a HLL program when this identifier changes?
Additional Comments(if required)
Thanks, Lekha

submitted on June 30, 2008 6:20 PM EST
Name:
Murty Varanasi
Email Address:
friendindeed@friends400.com
Subject/Topic
Amit’s query on Arrays
Query/Response(use.comment field for extra space)
I forgot to clarify. Since the file has I/O affect, you may resort to the file usage only when it is absolutely necessary. Otherwise you may think of other options like the Data Queues etc. if the Arrays cannnot be used.
Additional Comments(if required)


submitted on June 30, 2008 10:33 AM EST
Name:
Murty Varanasi
Email Address:
friendindeed@friends400.com
Subject/Topic
Reply to kumar11.amit@gmail.com query - Arrays
Query/Response(use.comment field for extra space)
Since the program has to allocate the memory it needs to know the array elements in advance. There is no way to increase the array dynamically. Only way is to create a work-file and populate with the necessary fields. (same like array structure, you can define the workfile) and populate ‘n’ number of records without any limit. Thanks Murty
Additional Comments(if required)


submitted on June 30, 2008 9:24 AM EST
Name:
Amit kumar
Email Address:
kumar11.amit@gmail.com
Subject/Topic
Regarding array dimension
Query/Response(use.comment field for extra space)
Dear friends400 members How to increase the dimension of an array at runtime. I have declared a character arry with DIM(1000),But the no. of elements may increase during runtime.Obviously i can’t declare the array with max.dim of 32767 as it would cause memory wastage. So is their any way that i can increase the DIM of the array at run time?
Additional Comments(if required)
Regards Amit

submitted on June 30, 2008 8:31 AM EST
Name:
Narasimham
Email Address:
vlnarasimham@gmail.com
Subject/Topic
Reply to Sreekar’s query
Query/Response(use.comment field for extra space)
Hi,Sreekar The data area name is QSS1MRI and it resides in QUSRSYS library. Type DSPDTAARA QSS1MRI on the command line and you can find the version of the operating systems you are using.
Additional Comments(if required)


submitted on June 30, 2008 6:05 AM EST
Name:
Sreekar
Email Address:
ss.sreekar@rediffmail.com
Subject/Topic
How to know the version of OS/400
Query/Response(use.comment field for extra space)
Hello, How to know the version of the OS/400 we are using apart from the spooledfiles data. I heard that there is a data area that stores the version of the operating systems,but iam not sure exactly what is it.
Additional Comments(if required)
Thanks in advance Sreekar

submitted on June 30, 2008 4:45 AM EST
Name:
Asuhtosh
Email Address:
s.asutosh@rediffmail.com
Subject/Topic
Reply for Narasimham’s answer
Query/Response(use.comment field for extra space)
Wow Narasimham, Thanks’s for your quick reply.That’s all solved my problem.
Additional Comments(if required)
Regards Ashutosh

submitted on June 30, 2008 4:34 AM EST
Name:
Narasimham
Email Address:
vlnarasimham@gmail.com
Subject/Topic
Reply for Asutosh’s query
Query/Response(use.comment field for extra space)
Hi, Asutosh Use FRCDTA keyword for the window in the Display file and in the program use WRITE opcode instead of EXFMT for the window. The FRCDTA keyword for window would make the control to come back to the program after the window is displayed
Additional Comments(if required)
Let me know whether this can help you

submitted on June 30, 2008 4:14 AM EST
Name:
Ashutosh
Email Address:
s.asutosh@rediffmail.com
Subject/Topic
Needs help to display the wait screen
Query/Response(use.comment field for extra space)
Hi, Friends I am writing a subfile program where in the load subroutine iam using SQL to get data from 3 to 4 files. My problem is currently the system is taking some time to display the records when the user enters a value in the search field as i need to get data from 3 to 4 files. So i have designed a window with some text like “System is searching records please wait…” and EXFMT it to present to the user until the screen gets loaded.but the control is not passing back to the program to load the data until i press ENTER button after the window popped up. Is there anyway that i can pass the control back to the main program after the window gets popped up without pressing ENTER key?
Additional Comments(if required)
Any help would be appreciated. Regards Ashutosh

submitted on June 30, 2008 12:04 AM EST
Name:
Rajendranath
Email Address:
m.rajendranath@bharti-axagi.co.in
Subject/Topic
Process structure
Query/Response(use.comment field for extra space)
Dear All, Can anyone help me in providing production support process structure. We have more than 500 users working on one AS400 application. Team of 5 members need to handle the production issues,
Additional Comments(if required)
Authority sanctioning, table ownership, user query maintenance, etc.., all these needs to be maintained. THANKS

submitted on June 27, 2008 5:13 PM EST
Name:
MURTY VARANASI
Email Address:
friendindeed@friends400.com
Subject/Topic
Got the SQL query issue resolved.
Query/Response(use.comment field for extra space)
The issue is resolved by using Digits() instead of int or dec. This gave the result which I was expecting of. Thought to put this finding in this forum, so that if anybody needs it in their applications they can use it.
Additional Comments(if required)


submitted on June 27, 2008 6:38 AM EST
Name:
Narasimhamurty Varanasi
Email Address:
friendindeed@friends400.com
Subject/Topic
SQL suggestion.
Query/Response(use.comment field for extra space)
I need to convert a numeric field to a character field in SQL by retaining the leading zeros. eg. a numeric field consisting of a date as ‘06272008′. When I use int() or dec(), the syntax is accepted in SQL, but the result appears as ‘6272008′. Any suggestion from anybody to retain the leading zeros. I tried even the Left(’0′,,8) syntax also, but what it takes is for ‘06272008′ it works properly. But for ‘12312008′ it takes as ‘02312008′ i.e., it replaces the initial character with zeros. Hence I don’t want to use this and looking for some other alternative.
Additional Comments(if required)


submitted on June 23, 2008 7:33 PM EST
Name:
Friends400 Admin. Team
Email Address:
friendindeed@friends400.com
Subject/Topic
ljai007 reg. GUI
Query/Response(use.comment field for extra space)
Hi ljai007, Thanks for your input. Since a lot of members do not know the full advantage of the GUI, if you don’t mind, can you please send just halfpage to onepage document on this, so that it can be published in friends400 site. Needless to mention, your proactive white paper will bring in a good momentum to the members. Thanks Murty Friends400 Admin.
Additional Comments(if required)


submitted on June 23, 2008 6:12 PM EST
Name:
ramana
Email Address:
ramv@rediffmail.com
Subject/Topic
Absolute value query of Amit
Query/Response(use.comment field for extra space)
Amit, looks like u will hv to manipulate it in the CL on your own. If it is RPG the %abs function is there. Anyway thought of sharing this with you. May be you may hear from others.
Additional Comments(if required)


submitted on June 23, 2008 9:32 AM EST
Name:
ljai007
Email Address:
ljai1@aol.com
Subject/Topic
Let us not forget lovely GUI
Query/Response(use.comment field for extra space)
Don’t forget about the beauty of making that green screen look like a web browser screen by utilizing such tools at Seagull Software’s Jwalk Developer to create a Graphical User Interface for those simpletons who don’t “get” the green screen
Additional Comments(if required)


submitted on June 23, 2008 6:06 AM EST
Name:
Amit kumar
Email Address:
kumar11.amit@gmail.com
Subject/Topic

Query/Response(use.comment field for extra space)
Hello friends How to get the absolute value of a numeric variable in CL. I want to round off a value like 3.3 to nearest integer 3. Any help would be appreciated
Additional Comments(if required)
Regards Amit

submitted on June 23, 2008 3:41 AM EST
Name:
Friends400 Admin. Team
Email Address:
friendindeed@friends400.com
Subject/Topic
Charges on friends400 - suggestion of Rajendra
Query/Response(use.comment field for extra space)
As a policy, effective from 20th June 2008, friends400 has taken a decision not to charge to the members. Still if any member is interested to pay/to support the cause of friends400, it can be in the form of releasing a classifieds like ‘birthday wishes’ to a friend/family members etc. which will be published in a 3*3 Cms. space in a prominent place in the friends400 website. The charges for such a classified ad. will be Rs.100.
Additional Comments(if required)
Note: Irrespective of whether a person releases a classified ad. in friends400 or not, our treatment of all members is ‘at par’ and we continue to extend our services to all our members who are customers with the same tempo.

submitted on June 23, 2008 12:58 AM EST
Name:
M Rajendranath
Email Address:
m.rajendranath@bharti-axagi.co.in
Subject/Topic

Query/Response(use.comment field for extra space)
Just my Opinion:- We should charge some minimal amount to access this site, because what the member is getting info on AS400/SQL is some thing very high technical points, in my opinion they cant get detailed as this site provides. Ofcourse they may get but difenetly not like clarifying the root cause of the issues, CAN ANYONE PLEASE COMMENT ON THIS
Additional Comments(if required)
Even though we are less in numbers but still we can wait some more time to take this site in strides.

submitted on June 20, 2008 3:45 PM EST
Name:
Rajendranath
Email Address:
m.rajendranath@bharti-axagi.co.in
Subject/Topic
Re:SQL Query
Query/Response(use.comment field for extra space)
Great!!! Your advice is working perfectly, it was a show stopper, now its done, Thanks a LOT!!! **Tushar & Srikant, please take a look on this, it will be usefull for us frequently
Additional Comments(if required)


submitted on June 20, 2008 1:36 PM EST
Name:
Murty Varanasi
Email Address:
friends400@gmail.com
Subject/Topic
SQL update.. Reply to Rajendranath’s query
Query/Response(use.comment field for extra space)
Suppose if your field has 500 char. and you need to update the words between 300 to 310 following is the query. Update set = substr(testfield,1,300) concat ‘newwordtst’ concat substr(testfield,311,500) where …… give the criteria as required like where Bank=’ ‘ or substr(field,1,3) = ‘HDR’
Additional Comments(if required)
I gave the example if you need to update all the HDR records in a file.
a name="1213986470060">
submitted on June 20, 2008 1:27 PM EST
Name:
Rajendranath
Email Address:
m.rajendranath@bharti-axagi.co.in
Subject/Topic
SQL
Query/Response(use.comment field for extra space)
I need to update few words in a line via sql, how to do it, please help immed
Additional Comments(if required)


submitted on June 19, 2008 6:35 AM EST
Name:
MURTY VARANASI
Email Address:
friends400@gmail.com
Query/Response(use.comment fields for extra space)
Further details on Sreekar’s query.
Additional Comments-1
Whether you create a source or not, you need to have the file-object present in advance to enable your RPG pgm. to get compiled. Just to create the object use the DSPFFD on a command line on a testfile, and clear the contents.
Additional Comments-2
If you are using a change-control tool like ALDON, Turnover, Implementer it insists a source. Hence you can use an AS400 source from the DDS or the SQL source like DDL (Data description language) and use the RS (Run SQL statement) which creates the object based on the DDL.
Additional Comments-3

Additional Comments-4

Additional Comments-5

Additional Comments-6

Additional Comments-7


submitted on June 19, 2008 6:32 AM EST
Name:
MURTY VARANASI
Email Address:
friends400@gmail.com
Query/Response(use.comment fields for extra space)
This is the response to query by Sreekar. ss.sreekar@rediffmail.com
Additional Comments-1
1. Create a file with structure like the output file of DSPFFD. - just the structure - And declare the file in your program. (You may not need to have a source also, just like the SQL table you can define in your pgm. in file-spec. by renaming the record format since SQL tables will have file/record format as same). Make sure to declare it with USER OPEN/CLOSE option for this file. 2. Either by calling a CL or using QCMDEXC API, give the DSPFFD command on the file with output-to-file created in step-1 above. 3. Open the file. Read the records sequentially. You will get all the field names like WHFILxx. 4. Please let me know if this helped you. 3.
Additional Comments-2
By the by, we encourage you to become a member in friends400. It is free.
Additional Comments-3

Additional Comments-4

Additional Comments-5

Additional Comments-6

Additional Comments-7


submitted on June 19, 2008 4:17 AM EST
Name:
Sreekar
Email Address:
ss.sreekar@rediffmail.com
Query/Response(use.comment fields for extra space)
Hi friends, How to get all the field names of a file in the program. I have to write a program where given the file name, i have to store all the fields names of that file in an array. Any help would be appreciated Thanks Sreekar
Additional Comments-1

Additional Comments-2

Additional Comments-3

Additional Comments-4

Additional Comments-5

Additional Comments-6

Additional Comments-7


submitted on June 17, 2008 9:25 PM EST
Name:
Murty Varanasi
Email Address:
friends400@gmail.com
Query/Response(use.comment fields for extra space)
This is Partial response to Soumendra’s query. The admin. team feels that you cannot give in SQL the (ISO…). Your query is sent to the expert team. Please await for their response.
Additional Comments-1

Additional Comments-2

Additional Comments-3

Additional Comments-4

Additional Comments-5

Additional Comments-6

Additional Comments-7


submitted on June 17, 2008 9:23 PM EST
Name:
Soumendra Mishra
Email Address:
som_som78@rediffmail.com
Query/Response(use.comment fields for extra space)
I want to compare two date TIBSHT and WRKDT.TIBSHT is 14 digit numeric field and WRKDT is Date type ISO field.These ae from two different files.When I tried to do a SQL query it is giving me error .My SQL query and error is below. SELECT tibsft from Testlib/Cktimel1 WHERE date(substring(char(tipstr),1,8)) in(select wrkdt from Testlib/Sfltl1a8) Error:Selection error involving field TIPSTR.
Additional Comments-1
My error is coming because thee is a mismatch in the field type.If I can convert numeric fileds to *ISO date then my problem will be solved
Additional Comments-2

Additional Comments-3

Additional Comments-4

Additional Comments-5

Additional Comments-6

Additional Comments-7


submitted on June 17, 2008 9:22 PM EST
Name:
MURTY VARANASI
Email Address:
friends400@gmail.com
Query/Response(use.comment fields for extra space)
Response to Rajendranath’s query on getting excel file into as400. 1. Make sure Excel has only ONE sheet. 2. Use SaveAS and save the Excel into a .CSV (Comma separateed values) file. 3. Use FTP (thru DOS prompt), since client access may not be available with some people, but DOS is available for everybody. Make the CD as your AS400 library (otherwise the file goes to QGPL). 4. Use the put Testfile.CSV to TESTxxx. 5. Create a STRUCTURED FILE (with the fields you need, say, if your excel has 5 columns, create 5 fields - to be on safeside give the max.length for each field eg. 100 char). 5. Use the command CPYFRMIMPF (Copy from import file). It asks for either an IFS file or a database file. Give the TESTxxx in the database file name, and TO-FILE as the STRUCTRED1. By default the field delimiter will be (,) comma hence no need to change it. That’s all. Data is copied. Let us know if you are successful. Best of luck.
Additional Comments-1
There are some tools available like CVTXLSxxx etc. but everybody may not have tools library, hence the safe method is to do the above.
Additional Comments-2

Additional Comments-3

Additional Comments-4

Additional Comments-5

Additional Comments-6

Additional Comments-7


submitted on June 17, 2008 9:21 PM EST
Name:
narasimham
Email Address:
vlnarasimham@gmail.com
Query/Response(use.comment fields for extra space)
This is to confirm that three more members TusharBambharolia,Rajendra varma,Srikanth rao were added to our members list.
Additional Comments-1

Additional Comments-2

Additional Comments-3

Additional Comments-4

Additional Comments-5

Additional Comments-6

Additional Comments-7


submitted on June 17, 2008 9:20 PM EST
Name:
M Rajinendranath
Email Address:
m.rajendranath@Bharti-axagi.co.
Query/Response(use.comment fields for extra space)
How to upload the data from excel to AS400 DB2, please help me out in this process
Additional Comments-1

Additional Comments-2

Additional Comments-3

Additional Comments-4

Additional Comments-5

Additional Comments-6

Additional Comments-7
Possibly related posts: (automatically generated)
! Post anonymously !
Tutorial: Comments
No Title
Miley Cyrus — You’re Dim Sum and Then Sum
Filed under: Discussion Forum Tagged: , , , , , ,
« Jokes Books - personality development »

No comments:

Post a Comment