I am too busy to post anything else on the blog. I will post your comments when log on if they don’t have any adult website link, so please be patient.
AS/400 – iSeries Sample COBOL program.
Posted by QB on November 1, 2008
CT wanted COBOL program written for IBM iSeries. The following is simple sample interactive program (online program) adding Customers Information. This program will add customer records and update existing Customers Information.
QB Software Inc.
*USER *SYSNAME
*DATE *TIME
Customer Number : 1234567890
Enter Customer Number and Press <Enter>
F3= End
When press enter second screen format will be displayed which will allow user to input or update the information.
Company heading constant.
Customer number will be output field on this format.*USER *SYSNAME
*DATE *TIMEName : (25) Characters
Address : (25) Characters
City : (20) Characters
State : (2) CharactersEnter Customer Information and Press
F3=End F12=Previous Screen
The formats will be designed using SDA which will generate your DSPF DDS. Condition indicator 30 is used to check the input field. The error message will be displayed “Customer Number be blank.” on line number 24, if user press enter leaving this field blank. The condition indicator 30 will also have the reverse image associated with this field attributes.
Condition indicators with reverse image and position cursor will be associated with all the input fields.
Indicator 33 Customer Name when “ON” will display message “Customer Name cannot be blanks.”
Indicator 34 Customber Address.
Fields User System Name Date and Time will be retrieved from system date and time. User name will be retrieved from Job Attributes.
Indicator 35 Customer City
Indicator 36 Customer State
The messages usually are defined in user message file but it will be easy for beginers to include the error messages on SDA formats.
IDENTIFICATION DIVISION.
PROGRAM-ID. CUSTMAST.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT Customer-FILE ASSIGN TO DISK-Customer
ORGANIZATION IS Indexed
Access Mode Is Dynamic
Record Key Is Cust-No.
SELECT Screen-File Assign TO WORKSTATION-CUSTFMTS
ORGANIZATION IS Transaction.
DATA DIVISION.
FILE SECTION.
FD Cust-FILE
LABEL RECORDS ARE STANDARD.
01 Custs-REC.
Copy DDS-ALL-FORMATS of CUSTOMER.
FD SCREEN-FILE
LABEL RECORDS ARE STANDARD.
01 SCREEN-REC.
COPY DDS-ALL-FORMATS OF CUSTFMTS.
WORKING-STORAGE SECTION.
77 IND-OFF PIC 1 VALUE B"0".
77 IND-ON PIC 1 VALUE B"0".
01 SCREEN-INDICATORS.
05 F03-EXIT PIC 1.
05 F12-PRV-SCRN PIC 1.
05 CUST-SPACES PIC 1.
05 CUST-NAME-SPACES PIC 1.
05 CUST-ADDRESS-SPACES PIC 1.
05 CUST-CITY-SPACES PIC 1.
05 CUST-STATE-SPACES PIC 1.
05 CUST-NOT-FOUND PIC 1.
PROCEDURE DIVISION.
MAIN-RTN.
OPEN I-O CUSTOMER-FILE
SCREEN-FILE.
PERFORM CUSTOMER-INUT-RTN UNTIL F03-EXIT.
CLOSE CUSTOMER-FILE
SCREEN-FILE.
STOP RUN.
CUSTOMER-INPUT-RTN.
WRITE SCREEN-REC FORMAT IS "CUSTFMT1"
INDICATORS ARE SCREEN-INDICATORS.
READ SCREEN-REC INDICATORS ARE SCREEN-INDICATORS.
IF CUST-NO = SPACES
MOVE IND-ON TO CUST-SPACES
GO TO CUSTOMER-INPUT-RTN.
PERFORM CHECK-CUSTOMER.
MOVE ZEROS TO SCREEN-INDICATORS.
PERFORM CUSTOMER-DETILAS.
CUSTOMER-DETAILS.
WRITE SCREEN-REC FORMAT IS "CUSTFMT2'
INDICATORS ARE SCREEN-INDICATORS.
READ SCREEN-REC INDICATORS ARE SCREEN-INDICATORS.
IF CUST-NAME = SPACES
MOVE IND-ON TO CUST-NAME-SPACES
GO TO CUSTOMER-DETAILS.
IF ADDRESS = SPACES
MOVE IND-ON TO CUST-ADDRESS-SPACES
GO TO CUSTOMER-DETAILS.
IF CITY = SPCACES
MOVE IND-ON TO CUST-CITY-SPACES
GO TO CUSTOMER-DETAILS.
IF STATE = SPACES
MOVE IND-ON TO CUST-STATE-SPACES
GO TO CUSTOMER-DETAILS.
MOVE ZEROS TO SCREEN-INDICATORS.
IF RECORD-NOT-FOUND
MOVE CORR CUSTFMT2 TO CUST-REC
WRITE CUST-REC
ELSE
MOVE CORR CUSTFMT2 TO CUST-REC
REWRITE CUST-REC.
CHECK-CUSTOMER.
MOVE IND-OFF TO CUST-NOT-FOUND.
READ CUST-FILE INVALID KEY
MOVE SPACES TO CUST-NAME
MOVE SPACES TO ADDRESS
MOVE SPACES TO CITY
MOVE SPACES TO STATE
MOVE IND-ON TO CUST-NOT-FOUND
NOT INVALID KEY
MOVE IND-OFF TO CUST-NOT-FOUND
MOVE CORR CUST-REC TO CUSTFMT1.
This is very simple iSeries COBOL program. You have to debug it for errors because
I did not compile and run the program.
STRDBG CUSTMAST updprod(*yes) will let you debug the source. Compile it with *Source
debug view. Also have not worked on COBOL for many many years and its kind of rusty.
This program written in RPG/ILE will be much simple.
Posted in AS/400, COBOL, Software, Technology, iSeries | 2 Comments »
Opinion from inside Iran by Farhang.
Posted by QB on September 13, 2008
Your web site is again unfiltered from yesterday and I can have access to it through ordinary internet proxy servers. I will keep regular inspection on this issue and if any thing changes, you will be informed accordingly .I hope all these hates between the two governments will finish and I will meet you in future. You may not be familiar with Iranian cultures. We are not an aggressive nation at all. Most of the people in here are very sensitive, sincere and kind with a very good sense of humor. I sometimes feel pity about the very false propaganda that western media create against us. Although our government has some problem, but even our politicians are not looking for violence and war. If you come to Iran your view will completely change .Here is really different .The problem is that US regime and its allies want to change the geopolitics of Middle East. They have surrounded us. They support many terrorist organizations.
They have created and support an aggressive and savage regime as Israel. They have fucked our ordinary life. People in here are under different pressures. Of course some of them are due to our faults but many are imposed by US government. Iran is always repeating that we are ready for negotiation, instead US is pushing us to approach Russia and China more and more .We want to be friend with all the countries under same and fair condition. But your government is acting proudly, not considering that we are a big and old nation. We do not accept any unfair behavior from any body. All of us are human not super man or god. Their period will finish. You are observing how they act. How they are directly causing Russia become stronger. For sure I do not want Russia to stay wick. I do not want any country be wick. Any how your government believes that we should not support Hezbollah of Lebanon. In fact they are mostly pure people, spending their life to defend their country. Seyed Hassan Nasorllah is a nice man.
He does not play dirty games .His life is always in danger. But he is there and hopefully will be until his mission is completed. US government should realize that the dream of resolving the countries in this region should be forgotten .If they realize this fact they will start to rectify their policy in this region and other regions too. At the same time Iran is getting stronger through self made advanced military weapons. My friend, believe me that I am not under the internal propaganda .The substantial progress in Iranian arm forces is a reality .We had to chose this pass because the US does not understand any other languages . If any war happens, US government is finished, unless they use atomic weapons or other mass destruction ones. In that case again they will be finished .Because even their own nation will not believe them any more.Because lies will show themselves as the Sun does.
In fact we do not want war and violence.It is against our mood and culture .Not because we are afraid or because we are under pressure.We are a nation strongly believe in the supernatural life.We believe that the period of our living on this planet is a flash when compared to the real life we will have in the later phases .Such a nation never feel any fear from death.This was clearly proved in Iran-Iraq war.US politicians should take lesson from it and I believe they have.
This will make the warmongers McCain and Palin understanding that Iran is not a threat at all. Like Saddam Hussein was not threat for US and its European allies. The Republicans are the one who are cling by creating fears exploiting 9/11. There will be no peace if US continue its policies of preemption for their favorite war on terror. It look like McCain and Palin will win the coming election. Iraqi government want US troops out, but this old idiot McCain insists to keep their country under occupation..
Posted in Bush, Hasan Nasrallah, Iran, Middle East War, Middle Eastern Politics, Politics, US Politics | 21 Comments »
Sarah Palin – Women Version OF Osama Bin Laden.
Posted by QB on September 4, 2008
Alaska Gov. Sarah Palin told ministry students at her former church that the United States sent troops to fight in the Iraq war on a “task that is from God.”
“Our national leaders are sending them out on a task that is from God,” she said. “That’s what we have to make sure that we’re praying for, that there is a plan and that plan is God’s plan.”
“I can do my job there in developing our natural resources and doing things like getting the roads paved and making sure our troopers have their cop cars and their uniforms and their guns, and making sure our public schools are funded,” she added. “But really all of that stuff doesn’t do any good if the people of Alaska’s heart isn’t right with God.”
We all will be fucked if McCain and Sarah Palin win the election. They will make world worst than what Bush has done in the name of God. Russia and Iran conflicts with grow with these two in White House.
Posted in John McCain, Politics, Presidential Race 2008, US Politics | 9 Comments »
Pervez Musharraf resignation.
Posted by QB on August 19, 2008
This is sad that honest Pervez Musharraf has to resign under pressure from corrupt criminals Nawaz and Zardari. Pervez Musharraf addopted the policies which he believe were in the best interest of Pakistan, he did not take any personal advantage of his position. Pervez Musharraf did not steel money from Pakistan, honest person is leaving the office leaving behind the most corrupted politicians incharge of the government.
The stupid Pakistanis who voted for these two criminals will go through very bad times as these two SOB will keep filling their foreign bank accounts.
Pervez Musharraf was pressurized by Bush and Britain to take of his uniform which is also the main cause of his resignation.
Pervez Musharraf is good honest man, will always have my respect.
Posted in Bush, Musharraf, Pakistan, Pervez Musharraf, Politics | 1 Comment »
Roger Federer Wimbledon loss.
Posted by QB on July 7, 2008
Roger Federer yesterday Wimbledon loss is too much of a shock to me that I really don’t feel like saying anything about this very sad result. All the credit goes to Rafael Nadal staying in the match and finish it off in his favor.
Federer in press conference said that he played good match, I don’t agree with him because he missed so many opportunities which could give him the record setting sixth Wimbledon Championship. The post match press conference is just after the conclusion of the match and I am sure that Federer himself was in shock. He will realize his mistakes onces he has chance of looking at the match critically and will avoid the same mistakes of getting panicky on important match points. Federer failed to materialize on the big important points of the match.
Federer has to win few Masters Series before US Open to keep his number 1 ranking.
Posted in Sports, Tennis, US Open | 7 Comments »
Wimbledon – Week 1.
Posted by QB on June 28, 2008
Wimbledon week one is the one full of surprise upsets which I have never witness before on grass court tournament. Novak Djokovic was defeated by Mart Safin than Andy Roddick lost to Tipservic. Andy Roddick has very good record on grass court tournaments and was hoping to see play interesting match with Federer but he lost in early round. Andy Roddick Queens four time champion when lost to Nadal was not that surprising because he make comeback after suffer shoulder injury in Rome. Roddick said that he chocked on big points was the main reason for losing the match make more sense but he has to overcome all his fears for North America hart courts season and US Open.
Federer chances are better than ever to write history by winning sixth consecutive Wimbledon Championship. He is playing very well this what I can say by looking at the scores, as I did not get a chance to watch any Wimbledon matches. Federer will face Layton Hewitt in fourth round which will not be that easy because Hewitt fight till the last point. Federer will win at the end.
There were upsets on women side too, Maria Sharapova early exit, Ana Ivanovic lost to 133 ranked Chinese player. Watching French open women matches and now in Wimbledon start missing Justine Henin more because I believe she would have won one more French Open and her first Wimbledon Championship which is wide open. Justine Henin was the most talented tough tennis player on women side has to reconsider her retirement decision immediately instead of doing it few years latter like Martina Hingis, she has many more of tennis left in her.
Today will the first time will watch Wimbledon and add some more thoughts.
Posted in Sports, Tennis, Wimbledon | Leave a Comment »
Wimbledon – Huge Upset.
Posted by QB on June 26, 2008
Wimbledon started and it was the first time look at the results on website this evening and find out that Marat Safin defeated Novak Djokovic who was one the the favorite to win title. This is really great news for me that now Roger Federer has one less opponent who has the game and nerve who can defeat him. Roger Federer win his match easily in straight sets.
Watch tennis on Saturday maybe by than someone would might create another upset by defeating Rafael Nadal.
Posted in Sports, Tennis, Wimbledon | 4 Comments »
U.S. helicopter engines stolen en route to Pakistan port
Posted by QB on June 19, 2008
This is the news headline never reported before that US supplies conveys come under attack en route into Afghanistan.This is anther proof that puppet President Hamid Karzai have no control outside Kabul. Also this is the proof that Pervez Musharraf “war on terror” aggression has failed to gain the control of NWFP.
US politicians will keep claiming that they are winning the “war on terror” in Afghanistan and Iraq without any real success. Wars in these two countries will continue trying to keep these countries under occupation.
Posted in Afghanistan, Al Qaeda, Al Qaida, Bush, Hamid Karzai, Musharraf, Pakistan, Pervez Musharraf, Politics, Taleban, Taliban, US Politics, War on Terror | Leave a Comment »
Afghan President threatens to send forces into Pakistan to fight against militants
Posted by QB on June 15, 2008
The puppet Afghan President Hamid Karzai threatening to send Afghan forces to fight Taliban into Pakistan does not have any control outside Kabul. This is a joke not a real threat. Afghans forces not very popular with the people of the country really can’t cross Pakistan borders. Hamid Karzai has made this ridiculous statement on behalf of occupation troops.
The Afghanistan situation will not improve if he take any such action it will become worst. The following news is interesting .
Taliban prison break ‘a small splash’
Interesting Hamid Karzai can’t protect his own country prison and wanted to attack Pakistan. Gordon Brown pledge to send more British troops to Afghanistan where 5 British soldiers were killed last week including 4 US soldiers. Taliban will keep fighting as long as it take to keep their resistance alive against occupation on minimum cost compared to US Britain huge financial logistic and occupation cost. There will be no clear victory for US and Britain in Afghanistan like Iraq and they have to withdraw at some point giving Taliban victory.
Posted in Afghanistan, Al Qaeda, Al Qaida, Asia, Bush, Osama Bin Laden, Pakistan, Politics, Taleban, Taliban, War on Terror | 1 Comment »
US Air Strike Killed 11 Pakistani Soldiers.
Posted by QB on June 11, 2008
US is defending its air strike on Pakistani Military Post justifying it for their war on terror. Pakistani reaction is very strong calling is unprovoked cowardly attack.
The Pakistani army said the coalition airstrike hit a post of the paramilitary Frontier Corps and was a “completely unprovoked and cowardly act.”
It launched a strong protest and reserved “the right to protect our citizens and soldiers against aggression,” the military said in a statement.
This will create more tension in NWFP as well within the Pakistan Military making it more difficult to fight Bush favorite war on terror.
Posted in Afghanistan, Al Qaeda, Al Qaida, Bush, Pakistan, Politics, Taleban, Taliban, US Politics, War on Terror | Leave a Comment »
Tennis – Pre Wimbledon Tournaments Started.
Posted by QB on June 9, 2008
The Queens grass court tournament has started and it is good to see Andy Roddick into men draw. Andy Roddick skip Rolland Garros because of shoulder injury is back in action. Rafael Nadal is also playing at Queens, he is the one clay court player becoming comfortable on grass which is very difficult for clay court players. Nadal and Djokovic would be the main obstacle for Roger Federer sixth straight Wimbledon title with Andy Roddick who always had good results on grass. Roger Federer will play in Germany grass court tournament and he will not face Nadal or Djokovic as they are playing in Queens.
The final between Federer vs Nadal was big disappointment, Nadal crushing him by playing excellent tennis.
Wimbledon three weeks away.
Posted in Sports, Tennis, Wimbledon | Leave a Comment »
iSeries – CL program record update.
Posted by QB on June 7, 2008
CL programs can read and update database records as well as read and write formats. CL programs can’t handle large database effectively so it is not good practice to update records from CL programs.
The simple example of CL program record update.
PGM
DCL Var(&FileName) *Char Len(10)
DCL Var(&LibName) *Char Len(10)
ChgVar Var(&FileName) Value(’AcctPayble’)
ChgVar Var(&LibName) Value(’Accounts’)
DCLF File(&LibName/&FileName)
Read: RCVF /* Read the first record */
MonMsg MSGID(CPF0864) EXEC(GOTO CMDLBL(EOF))
Process: Do your processing here….. whatever it may be
SndF /* Update record after processing */
GoTo Read
EOF: /* End Of File */
EndPgm
Very simple program to update database.
Update : CLLE program did not update keyed database. It works well for SDA formats. Did not try to update sequential file yet.
Posted in CL Programming, Technology, iSeries | 2 Comments »
French Open. Roger Federer vs Rafael Nadal Final Sunday.
Posted by QB on June 6, 2008
Federer and Nadal once again will face in French Open final on Sunday. Nadal played exceptionally well today defeating Djokovic in straight sets. The match was display of high quality tennis.
Federer defeated Gael Monfils of France in four sets with vulnerability not playing high quality tennis. Federer missed easy volleys on the net, engaging in long rallies, which does not benefit him, his serve not very effective as well. Monfils, on the other hand, played very very good tennis match showing his real potential. Monfils look like has matured player now and this is for the first time he has impressed me showing his cross court shorts angle shorts and the power. He will climb up to top ten players ranking if he just keep this level of game.
Federer has to come with different game plan if he wanted to win against the best clay court player Nadal. Federer can’t involve in long rallies with Nadal because he is the best returner of the ball in tennis, come to the court keeping his fear of losing another final to Nadal out of his mind. The taking the fear factor out will help him play high quality tennis. Federer play the match trying to finish the point as quickly as possible.
This is how he can win his first French Open title.
Posted in Rolland Garros French Open, Sports, Tennis | 3 Comments »
Ehud Olmert dangerous intentions to save his political career.
Posted by QB on June 6, 2008
The Deputy Prime Minister is threatening Iran will be attack if they did not stop their nuclear program. Ehud Olmert also wanted to stop nuclear program by all means possible. This would be another mistake by this corrupt politician to save his political career like his decision to attack Lebanon. The Lebanon invasion, which could have been easily avoided was complete disaster for Israel. Ehud Olmert visited White House yesterday trying to get Bush blessing on Iran attack.
There are more disadvantages than any advantages looking at the present Middle East situation. Israel is engaged in peace talks with Syria with Turkey assistance will be stopped, Hezbollah start firing missiles across Israeli border, Syria will support Iran, Iraq situation will become more violent, Al Qaeda will get fresh reason to create hatred against Israel and USA.
Ehud Olmert is not in a position to comment any other mistake. He might survive the corruption charges but it will be impossible to hold on to power after another fail war.
Posted in Bush, Iran, Iran Nuclear Program, Israel, Lebanon, Middle East, Middle East War, Middle Eastern Politics, Politics, US Politics | Leave a Comment »