Re: [U2] AIX uname and Redback
What i usually do in these sort of circumstances is a 'set set.out' and then compare that to a set done while a normal telnet user. There may be something missing in a profile file -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Tony Gravagno Sent: 04 August 2011 22:35 To: u2-users@listserver.u2ug.org Subject: Re: [U2] AIX uname and Redback Yeah, I already asked the client to use which uname and to otherwise look around for another executable, and the one in /usr/bin is the only one he can find. Keep the ideas coming bud. :) Thanks. T From: Kevin King Tony, are you sure Redback isn't setting some $PATH that's running something other than the AIX uname (/usr/bin/uname)? ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users - No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1390 / Virus Database: 1518/3810 - Release Date: 08/04/11 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] AIX uname and Redback
Another thought - have you checked the group of the redback user, maybe it is a permissions thing , i presume uname gathers its info from /sys and there may be some restriction somewhere. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Tony Gravagno Sent: 05 August 2011 02:36 To: u2-users@listserver.u2ug.org Subject: Re: [U2] AIX uname and Redback To my knowledge Redback itself isn't being asked for anything. A BASIC sub was executed and returned the short result - I believe this does what you're suggesting. That sub also kicks off a phantom with the same results. Code is below. FYI, I don't use Redback myself so please forgive any misunderstanding of something that you're trying to convey. I'll pass along new suggestions to the client. Thanks for the note. More suggetions welcome. T From: Gregor Scott Have you confirmed if it is a reporting problem or a data capture problem? I.e. is that the uname -Fa is still producing the full output, but the RedBack environment does not return the entire result? You could try uname -Fa|tee /tmp/uname.redback.$$ to capture what is being output and compare it to the result RedBack is reporting. SUBROUTINE UNAME.TEST(OUT) OPEN '','VOC' TO FVOC ELSE RETURN * Execute uname writing to /tmp EXECUTE SH -c 'uname -Fa /tmp/uname.txt' CMD = \SH -c su redback redadmin | uname -Fa\ CMD := \ /tmp/uname.redback.txt\ EXECUTE CMD * Execute phantom processing uname EXECUTE 'PHANTOM RUN BP UNAME.PHANTOM' ; * code below * Execute uname capturing results EXECUTE \SH -c uname -Fa 2/dev/null\ CAPTURING OUT OUT-1=@LOGNAME = :@LOGNAME OUT-1=@WHO = :@WHO OUT-1=@PATH = :@PATH OUT-1=@ACCOUNT = :@ACCOUNT OUT-1=@AUTHORIZATION = :@AUTHORIZATION WRITELIST OUT ON 'UNAME.OUT' * Get current environment variables EXECUTE \SH -c whoami 2/dev/null\CAPTURING WHOAMI WRITELIST WHOAMI ON 'WHOAMI' EXECUTE \SH -c env 2/dev/null\CAPTURING ENV WRITELIST ENV ON 'ENV' RETURN END UNAME.PHANTOM: OUT = '' OPEN 'VOC' TO FVOC ELSE STOP EXECUTE SH -c 'uname -Fa /tmp/uname.ph.txt' EXECUTE \SH -c uname -Fa 2/dev/null\ CAPTURING OUT WRITE OUT ON FVOC,'PHANTOM.OUT' END ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users - No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1390 / Virus Database: 1518/3810 - Release Date: 08/04/11 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] AIX uname and Redback
One 'simple' thing to try... I'd ask them to first check the ulimit settings from the UNIX shell before they enter (ie., what is the default). For all the values not set already to unlimited. Retry and see if that makes any difference. Only other thing I can suggest: create a Korn Shell VOC entry and call that...I am guessing that this for UV? -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Tony Gravagno Sent: Friday, 5 August 2011 11:36 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] AIX uname and Redback To my knowledge Redback itself isn't being asked for anything. A BASIC sub was executed and returned the short result - I believe this does what you're suggesting. That sub also kicks off a phantom with the same results. Code is below. FYI, I don't use Redback myself so please forgive any misunderstanding of something that you're trying to convey. I'll pass along new suggestions to the client. ** IMPORTANT MESSAGE * This e-mail message is intended only for the addressee(s) and contains information which may be confidential. If you are not the intended recipient please advise the sender by return email, do not use or disclose the contents, and delete the message and any attachments from your system. Unless specifically indicated, this email does not constitute formal advice or commitment by the sender or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its subsidiaries. We can be contacted through our web site: commbank.com.au. If you no longer wish to receive commercial electronic messages from us, please reply to this e-mail by typing Unsubscribe in the subject line. ** ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
[U2] Strange CASE Statement behavior
I'm running on Universe 10.3.4 on AIX 5.3 on a PICK flavor account. I ran into some really weird behavior with a CASE statement this morning, or at least what I deem to be strange. I won't post the entire program... yet Basically I have some boolean variables that get set earlier in the program to the following values. exact_alpha1_found= @FALSE partial_alpha1s_found = @TRUE partial_names_found = @TRUE Then the CASE statement does its checks... BEGIN CASE CASE exact_alpha1_found ...do something... CASE (partial_alpha1s_found AND partial_names_found) ...do something... CASE partial_names_found ...do something... END CASE However, the CASE partial_names_found never executes. It fails!!! Is it only allowed to check these once, and thats it? In the debugger the value of partial_names_found is still a 1, even after the check fails. -- John Thompson ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Strange CASE Statement behavior
Yeah I need sleep... Sorry. Thanks. On Fri, Aug 5, 2011 at 11:01 AM, Israel, John R. johnisr...@daytonsuperior.com wrote: Your 2nd CASE was satisfied so no further CASE conditions were tested. Unlike some other languages, once a CASE condition is met, no other CASE conditions are tested. John Israel Senior Programmer/Analyst Dayton Superior Corporation 1125 Byers Road Miamisburg, OH 45342 -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto: u2-users-boun...@listserver.u2ug.org] On Behalf Of John Thompson Sent: Friday, August 05, 2011 10:58 AM To: U2 Users List Subject: [U2] Strange CASE Statement behavior I'm running on Universe 10.3.4 on AIX 5.3 on a PICK flavor account. I ran into some really weird behavior with a CASE statement this morning, or at least what I deem to be strange. I won't post the entire program... yet Basically I have some boolean variables that get set earlier in the program to the following values. exact_alpha1_found= @FALSE partial_alpha1s_found = @TRUE partial_names_found = @TRUE Then the CASE statement does its checks... BEGIN CASE CASE exact_alpha1_found ...do something... CASE (partial_alpha1s_found AND partial_names_found) ...do something... CASE partial_names_found ...do something... END CASE However, the CASE partial_names_found never executes. It fails!!! Is it only allowed to check these once, and thats it? In the debugger the value of partial_names_found is still a 1, even after the check fails. -- John Thompson ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users -- John Thompson ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Strange CASE Statement behavior
Hi John Based on the values of your variables, your CASE construct is behaving perfectly! As far as I can tell, the reason partial_names_found never executes is because the preceding clause in your CASE statement evaluates to /true/. In a CASE block, each clause is checked until a clause is found which evaluates to /true. /The preceding conditions in the CASE are not checked. If you really do need to know the results of all conditions, you may be better of with using multiple IF clauses. Regards */Glenn Sallis /**Glenn Sallis Softwareentwicklung und Beratung *47608 Geldern·Deutschland Tel: + 49 2831 9104220 Mob: +49 151 55714743· Email:_gl...@glennsallis.de mailto:gl...@glennsallis.de___ Web: www.glennsallis.de http://www.glennsallis.de/ /Ihr Zuhause für unabhängige MultiValue Beratung in Deutschland und Benelux/ Am 05.08.2011 16:57, schrieb John Thompson: I'm running on Universe 10.3.4 on AIX 5.3 on a PICK flavor account. I ran into some really weird behavior with a CASE statement this morning, or at least what I deem to be strange. I won't post the entire program... yet Basically I have some boolean variables that get set earlier in the program to the following values. exact_alpha1_found= @FALSE partial_alpha1s_found = @TRUE partial_names_found = @TRUE Then the CASE statement does its checks... BEGIN CASE CASE exact_alpha1_found ...do something... CASE (partial_alpha1s_found AND partial_names_found) ...do something... CASE partial_names_found ...do something... END CASE However, the CASE partial_names_found never executes. It fails!!! Is it only allowed to check these once, and thats it? In the debugger the value of partial_names_found is still a 1, even after the check fails. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Strange CASE Statement behavior
This is the reason you always place CASE 1 at the end... :-) -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Glenn Sallis Sent: Friday, August 05, 2011 11:00 AM To: U2 Users List Subject: Re: [U2] Strange CASE Statement behavior Hi John Based on the values of your variables, your CASE construct is behaving perfectly! As far as I can tell, the reason partial_names_found never executes is because the preceding clause in your CASE statement evaluates to /true/. In a CASE block, each clause is checked until a clause is found which evaluates to /true. /The preceding conditions in the CASE are not checked. If you really do need to know the results of all conditions, you may be better of with using multiple IF clauses. Regards */Glenn Sallis /**Glenn Sallis Softwareentwicklung und Beratung *47608 Geldern·Deutschland Tel: + 49 2831 9104220 Mob: +49 151 55714743· Email:_gl...@glennsallis.de mailto:gl...@glennsallis.de___ Web: www.glennsallis.de http://www.glennsallis.de/ /Ihr Zuhause für unabhängige MultiValue Beratung in Deutschland und Benelux/ Am 05.08.2011 16:57, schrieb John Thompson: I'm running on Universe 10.3.4 on AIX 5.3 on a PICK flavor account. I ran into some really weird behavior with a CASE statement this morning, or at least what I deem to be strange. I won't post the entire program... yet Basically I have some boolean variables that get set earlier in the program to the following values. exact_alpha1_found= @FALSE partial_alpha1s_found = @TRUE partial_names_found = @TRUE Then the CASE statement does its checks... BEGIN CASE CASE exact_alpha1_found ...do something... CASE (partial_alpha1s_found AND partial_names_found) ...do something... CASE partial_names_found ...do something... END CASE However, the CASE partial_names_found never executes. It fails!!! Is it only allowed to check these once, and thats it? In the debugger the value of partial_names_found is still a 1, even after the check fails. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
[U2] Job won't run
I have run into something I have never seen before. We exchange a lot of data with an AS400 in Chicago. For many years we have taken the approach that the AS400 would submit a job to our UNIX box that would run a script. Many of the scripts run a Unibasic program and send the resulting file back to the AS400. This happens several times a day and we have been doing this for many years. One job has started doing something odd. It runs the script and transfers the file, but never runs the Unibasic program, so it has been resending an old version of the file. This seems to have started happening 3 days ago. I can log in manually using the same credentials as the remote job, and run the script by typing it in at the command line. It runs perfectly. Unibasic program runs, new file is sent to the AS400. There is joy. I have checked permissions. Nothing has changed at the AS400 end. Nothing has changed here. (That we know of). I have rechecked the code of he script and the Unibasic program. Looks good. I am stumped. Here is the script code. #!/usr/bin/ksh #Sends FILES_AS400/BOWER_FPO to AS400 as BOWER_FPO LOG=/NTN/DATA/CORPORATE/FILES_LOG/BOWER_FPO.LOG rm $LOG touch $LOG cd /NTN/DATA/CORPORATE echo `date` Extracting Firm Planned Orders to BOWER_FPO $LOG $UDTBIN/udtEOD$LOG RUN GD-BPGM EXTRACT_FPO -N bye EOD echo Sending Firm Planned Orders to AS400 730 $LOG /usr/local/rputj.scr CORP BOWER_FPO FILES_AS400/BOWER_FPO BOWER_FPO echo `date` Finished sending Firm Planned Orders $LOG This runs perfectly when run from CL, but not when submitted from the AS400. And ideas? Charles Shaffer Senior Analyst NTN-Bower Corporation ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Strange CASE Statement behavior
Thanks guys. One of those days where you stare at something for a while, and on't realize the obvious :( On Fri, Aug 5, 2011 at 11:12 AM, Marc Harbeson marc.harbe...@gmail.comwrote: This is the reason you always place CASE 1 at the end... :-) -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Glenn Sallis Sent: Friday, August 05, 2011 11:00 AM To: U2 Users List Subject: Re: [U2] Strange CASE Statement behavior Hi John Based on the values of your variables, your CASE construct is behaving perfectly! As far as I can tell, the reason partial_names_found never executes is because the preceding clause in your CASE statement evaluates to /true/. In a CASE block, each clause is checked until a clause is found which evaluates to /true. /The preceding conditions in the CASE are not checked. If you really do need to know the results of all conditions, you may be better of with using multiple IF clauses. Regards */Glenn Sallis /**Glenn Sallis Softwareentwicklung und Beratung *47608 Geldern·Deutschland Tel: + 49 2831 9104220 Mob: +49 151 55714743· Email:_gl...@glennsallis.de mailto:gl...@glennsallis.de___ Web: www.glennsallis.de http://www.glennsallis.de/ /Ihr Zuhause für unabhängige MultiValue Beratung in Deutschland und Benelux/ Am 05.08.2011 16:57, schrieb John Thompson: I'm running on Universe 10.3.4 on AIX 5.3 on a PICK flavor account. I ran into some really weird behavior with a CASE statement this morning, or at least what I deem to be strange. I won't post the entire program... yet Basically I have some boolean variables that get set earlier in the program to the following values. exact_alpha1_found= @FALSE partial_alpha1s_found = @TRUE partial_names_found = @TRUE Then the CASE statement does its checks... BEGIN CASE CASE exact_alpha1_found ...do something... CASE (partial_alpha1s_found AND partial_names_found) ...do something... CASE partial_names_found ...do something... END CASE However, the CASE partial_names_found never executes. It fails!!! Is it only allowed to check these once, and thats it? In the debugger the value of partial_names_found is still a 1, even after the check fails. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users -- John Thompson ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Job won't run
Did anything change in your VOC LOGIN program/proc/paragraph that might be preventing the program from running? Susan Lynch F. W. Davison Company, Inc. - Original Message - From: charles_shaf...@ntn-bower.com To: U2 Users List u2-users@listserver.u2ug.org Sent: 08/05/2011 11:26 AM Subject: [U2] Job won't run I have run into something I have never seen before. We exchange a lot of data with an AS400 in Chicago. For many years we have taken the approach that the AS400 would submit a job to our UNIX box that would run a script. Many of the scripts run a Unibasic program and send the resulting file back to the AS400. This happens several times a day and we have been doing this for many years. One job has started doing something odd. It runs the script and transfers the file, but never runs the Unibasic program, so it has been resending an old version of the file. This seems to have started happening 3 days ago. I can log in manually using the same credentials as the remote job, and run the script by typing it in at the command line. It runs perfectly. Unibasic program runs, new file is sent to the AS400. There is joy. I have checked permissions. Nothing has changed at the AS400 end. Nothing has changed here. (That we know of). I have rechecked the code of he script and the Unibasic program. Looks good. I am stumped. Here is the script code. #!/usr/bin/ksh #Sends FILES_AS400/BOWER_FPO to AS400 as BOWER_FPO LOG=/NTN/DATA/CORPORATE/FILES_LOG/BOWER_FPO.LOG rm $LOG touch $LOG cd /NTN/DATA/CORPORATE echo `date` Extracting Firm Planned Orders to BOWER_FPO $LOG $UDTBIN/udtEOD$LOG RUN GD-BPGM EXTRACT_FPO -N bye EOD echo Sending Firm Planned Orders to AS400 730 $LOG /usr/local/rputj.scr CORP BOWER_FPO FILES_AS400/BOWER_FPO BOWER_FPO echo `date` Finished sending Firm Planned Orders $LOG This runs perfectly when run from CL, but not when submitted from the AS400. And ideas? Charles Shaffer Senior Analyst NTN-Bower Corporation ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Job won't run
Since you say it's sending the same file each day, then it's not just the Unibasic that is not running, the rm isn't working either, otherwise, you would be sending a blank file over and over. How are you running this script from the AS400? rsh? If so, has the user that running it on the AS400 changed? Could they be logging in under the C Shell? I don't know if Korn scripts will run under csh, never really tried it. George -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- boun...@listserver.u2ug.org] On Behalf Of charles_shaf...@ntn-bower.com Sent: Friday, August 05, 2011 11:27 AM To: U2 Users List Subject: [U2] Job won't run I have run into something I have never seen before. We exchange a lot of data with an AS400 in Chicago. For many years we have taken the approach that the AS400 would submit a job to our UNIX box that would run a script. Many of the scripts run a Unibasic program and send the resulting file back to the AS400. This happens several times a day and we have been doing this for many years. One job has started doing something odd. It runs the script and transfers the file, but never runs the Unibasic program, so it has been resending an old version of the file. This seems to have started happening 3 days ago. I can log in manually using the same credentials as the remote job, and run the script by typing it in at the command line. It runs perfectly. Unibasic program runs, new file is sent to the AS400. There is joy. I have checked permissions. Nothing has changed at the AS400 end. Nothing has changed here. (That we know of). I have rechecked the code of he script and the Unibasic program. Looks good. I am stumped. Here is the script code. #!/usr/bin/ksh #Sends FILES_AS400/BOWER_FPO to AS400 as BOWER_FPO LOG=/NTN/DATA/CORPORATE/FILES_LOG/BOWER_FPO.LOG rm $LOG touch $LOG cd /NTN/DATA/CORPORATE echo `date` Extracting Firm Planned Orders to BOWER_FPO $LOG $UDTBIN/udtEOD$LOG RUN GD-BPGM EXTRACT_FPO -N bye EOD echo Sending Firm Planned Orders to AS400 730 $LOG /usr/local/rputj.scr CORP BOWER_FPO FILES_AS400/BOWER_FPO BOWER_FPO echo `date` Finished sending Firm Planned Orders $LOG This runs perfectly when run from CL, but not when submitted from the AS400. And ideas? Charles Shaffer Senior Analyst NTN-Bower Corporation ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Job won't run
Did anything change in your VOC LOGIN program/proc/paragraph that might be preventing the program from running? Susan Lynch F. W. Davison Company, Inc. I don't think so. Wouldn't that affect the command line run also? Charles Shaffer Senior Analyst NTN-Bower Corporation ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Job won't run
Not necessarily - if, for example, you have a branch in your VOC LOGIN that varies on usertype or on the login user (eg SYSTEM to avoid having Redback processes run some parts of the LOGIN routine, which is one thing that we do), you might have inadvertantly caused the user id for this process to fail when run by the automated script, but not when run as your user id. Susan Lynch F.W. Davison Company, Inc, - Original Message - From: charles_shaf...@ntn-bower.com To: U2 Users List u2-users@listserver.u2ug.org Cc: U2 Users List u2-users@listserver.u2ug.org; u2-users-boun...@listserver.u2ug.org Sent: 08/05/2011 11:50 AM Subject: Re: [U2] Job won't run Did anything change in your VOC LOGIN program/proc/paragraph that might be preventing the program from running? Susan Lynch F. W. Davison Company, Inc. I don't think so. Wouldn't that affect the command line run also? Charles Shaffer Senior Analyst NTN-Bower Corporation ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Job won't run
George Since you say it's sending the same file each day, then it's not just the Unibasic that is not running, the rm isn't working either, otherwise, you would be sending a blank file over and over. The remove and touch affect the log file. The data file is cleared in the program. Since the program doesn't execute, the file doesn't change. * Clear the output file OUTPUT = /NTN/DATA/CORPORATE/FILES_AS400/BOWER_FPO PCPERFORM rm :OUTPUT PCPERFORM touch :OUTPUT How are you running this script from the AS400? rsh? If so, has The actual command on the AS400 is: RUNRMTCMD CMD('/NTN/DATA/CORPORATE/PROCESSES/fpo_as400') RMTLOCNAME('xx.xxx.xxx.xx' *IP) RMTUSER() RMTPWD() I looked into this one time and the AS400 is running an rsh underneath. has the user that running it on the AS400 changed? They say no and I believe them because it would have affecteed many jobs. This is Redhat and the default shell is bsh. We run lots of ksh scripts on it. They were ported over from Tru64 many years ago. Charles Shaffer Senior Analyst NTN-Bower Corporation George Gallen ggal...@wyanokegroup.com Sent by: u2-users-boun...@listserver.u2ug.org 08/05/2011 10:34 AM Please respond to U2 Users List To: U2 Users List u2-users@listserver.u2ug.org cc: Subject:Re: [U2] Job won't run Since you say it's sending the same file each day, then it's not just the Unibasic that is not running, the rm isn't working either, otherwise, you would be sending a blank file over and over. How are you running this script from the AS400? rsh? If so, has the user that running it on the AS400 changed? Could they be logging in under the C Shell? I don't know if Korn scripts will run under csh, never really tried it. George -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- boun...@listserver.u2ug.org] On Behalf Of charles_shaf...@ntn-bower.com Sent: Friday, August 05, 2011 11:27 AM To: U2 Users List Subject: [U2] Job won't run I have run into something I have never seen before. We exchange a lot of data with an AS400 in Chicago. For many years we have taken the approach that the AS400 would submit a job to our UNIX box that would run a script. Many of the scripts run a Unibasic program and send the resulting file back to the AS400. This happens several times a day and we have been doing this for many years. One job has started doing something odd. It runs the script and transfers the file, but never runs the Unibasic program, so it has been resending an old version of the file. This seems to have started happening 3 days ago. I can log in manually using the same credentials as the remote job, and run the script by typing it in at the command line. It runs perfectly. Unibasic program runs, new file is sent to the AS400. There is joy. I have checked permissions. Nothing has changed at the AS400 end. Nothing has changed here. (That we know of). I have rechecked the code of he script and the Unibasic program. Looks good. I am stumped. Here is the script code. #!/usr/bin/ksh #Sends FILES_AS400/BOWER_FPO to AS400 as BOWER_FPO LOG=/NTN/DATA/CORPORATE/FILES_LOG/BOWER_FPO.LOG rm $LOG touch $LOG cd /NTN/DATA/CORPORATE echo `date` Extracting Firm Planned Orders to BOWER_FPO $LOG $UDTBIN/udtEOD$LOG RUN GD-BPGM EXTRACT_FPO -N bye EOD echo Sending Firm Planned Orders to AS400 730 $LOG /usr/local/rputj.scr CORP BOWER_FPO FILES_AS400/BOWER_FPO BOWER_FPO echo `date` Finished sending Firm Planned Orders $LOG This runs perfectly when run from CL, but not when submitted from the AS400. And ideas? Charles Shaffer Senior Analyst NTN-Bower Corporation ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Job won't run
what if you throw a whoami, groups and env into the script and check your logfile against those values when your on the CL, to see if anything jumps out. George -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- boun...@listserver.u2ug.org] On Behalf Of charles_shaf...@ntn-bower.com Sent: Friday, August 05, 2011 12:04 PM To: U2 Users List Subject: Re: [U2] Job won't run George Since you say it's sending the same file each day, then it's not just the Unibasic that is not running, the rm isn't working either, otherwise, you would be sending a blank file over and over. The remove and touch affect the log file. The data file is cleared in the program. Since the program doesn't execute, the file doesn't change. * Clear the output file OUTPUT = /NTN/DATA/CORPORATE/FILES_AS400/BOWER_FPO PCPERFORM rm :OUTPUT PCPERFORM touch :OUTPUT How are you running this script from the AS400? rsh? If so, has The actual command on the AS400 is: RUNRMTCMD CMD('/NTN/DATA/CORPORATE/PROCESSES/fpo_as400') RMTLOCNAME('xx.xxx.xxx.xx' *IP) RMTUSER() RMTPWD() I looked into this one time and the AS400 is running an rsh underneath. has the user that running it on the AS400 changed? They say no and I believe them because it would have affecteed many jobs. This is Redhat and the default shell is bsh. We run lots of ksh scripts on it. They were ported over from Tru64 many years ago. Charles Shaffer Senior Analyst NTN-Bower Corporation ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Job won't run
Susan Not necessarily - if, for example, you have a branch in your VOC LOGIN that varies on usertype or on the login user (eg SYSTEM to avoid having Redback processes run some parts of the LOGIN routine, which is one thing that we do), you might have inadvertantly caused the user id for this process to fail when run by the automated script, but not when run as your user id. My first response was going to be wouldn't it affect our other remotely run scripts too? Then I thought of something. This is the first time we have had a situation where the AS400 initiates a job and then receives a file back. Normally files sent to the AS400 are initiated from here either in a program, or from kron. Jobs from the AS400 are normally sending us files. Not sure why this would be different, but it gives me something to look into. Thanks for the ideas everybody. Charles Shaffer Senior Analyst NTN-Bower Corporation ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Job won't run
I agree on checking permissions on the executable. That aside have you considered adding a EXECUTE COMO ON TEST or something similar to the top of the program to capture any output it might be producing? On Fri, Aug 5, 2011 at 10:23 AM, Dan Fitzgerald dangf...@hotmail.comwrote: And it _does_ get past the udt program; i.e., it actually sends the file, and updates the log? I'd look at lsuser for the id running the ud program, and the permissions on the program executable. I'd take a direct look at the user and program groups; maybe an admin somewhere changed the user's group list, or someone recompiled the ud pgm changed ownership, ... You're sure that it doesn't even get into the ud program? Could it be trying to open a file that it can't for some reason (again, a group change would do this) near the top of the program (or trying to execute a sub, etc), then exiting the program, returning to the script before it clears the old file? To: u2-users@listserver.u2ug.org From: charles_shaf...@ntn-bower.com Date: Fri, 5 Aug 2011 11:04:08 -0500 Subject: Re: [U2] Job won't run George Since you say it's sending the same file each day, then it's not just the Unibasic that is not running, the rm isn't working either, otherwise, you would be sending a blank file over and over. The remove and touch affect the log file. The data file is cleared in the program. Since the program doesn't execute, the file doesn't change. * Clear the output file OUTPUT = /NTN/DATA/CORPORATE/FILES_AS400/BOWER_FPO PCPERFORM rm :OUTPUT PCPERFORM touch :OUTPUT How are you running this script from the AS400? rsh? If so, has The actual command on the AS400 is: RUNRMTCMD CMD('/NTN/DATA/CORPORATE/PROCESSES/fpo_as400') RMTLOCNAME('xx.xxx.xxx.xx' *IP) RMTUSER() RMTPWD() I looked into this one time and the AS400 is running an rsh underneath. has the user that running it on the AS400 changed? They say no and I believe them because it would have affecteed many jobs. This is Redhat and the default shell is bsh. We run lots of ksh scripts on it. They were ported over from Tru64 many years ago. Charles Shaffer Senior Analyst NTN-Bower Corporation George Gallen ggal...@wyanokegroup.com Sent by: u2-users-boun...@listserver.u2ug.org 08/05/2011 10:34 AM Please respond to U2 Users List To: U2 Users List u2-users@listserver.u2ug.org cc: Subject:Re: [U2] Job won't run Since you say it's sending the same file each day, then it's not just the Unibasic that is not running, the rm isn't working either, otherwise, you would be sending a blank file over and over. How are you running this script from the AS400? rsh? If so, has the user that running it on the AS400 changed? Could they be logging in under the C Shell? I don't know if Korn scripts will run under csh, never really tried it. George -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- boun...@listserver.u2ug.org] On Behalf Of charles_shaf...@ntn-bower.com Sent: Friday, August 05, 2011 11:27 AM To: U2 Users List Subject: [U2] Job won't run I have run into something I have never seen before. We exchange a lot of data with an AS400 in Chicago. For many years we have taken the approach that the AS400 would submit a job to our UNIX box that would run a script. Many of the scripts run a Unibasic program and send the resulting file back to the AS400. This happens several times a day and we have been doing this for many years. One job has started doing something odd. It runs the script and transfers the file, but never runs the Unibasic program, so it has been resending an old version of the file. This seems to have started happening 3 days ago. I can log in manually using the same credentials as the remote job, and run the script by typing it in at the command line. It runs perfectly. Unibasic program runs, new file is sent to the AS400. There is joy. I have checked permissions. Nothing has changed at the AS400 end. Nothing has changed here. (That we know of). I have rechecked the code of he script and the Unibasic program. Looks good. I am stumped. Here is the script code. #!/usr/bin/ksh #Sends FILES_AS400/BOWER_FPO to AS400 as BOWER_FPO LOG=/NTN/DATA/CORPORATE/FILES_LOG/BOWER_FPO.LOG rm $LOG touch $LOG cd /NTN/DATA/CORPORATE echo `date` Extracting Firm Planned Orders to BOWER_FPO $LOG $UDTBIN/udtEOD$LOG RUN GD-BPGM EXTRACT_FPO -N bye EOD echo Sending Firm Planned Orders to AS400 730 $LOG /usr/local/rputj.scr CORP BOWER_FPO FILES_AS400/BOWER_FPO BOWER_FPO echo `date` Finished sending Firm Planned Orders $LOG This runs perfectly when run from CL, but not when submitted from the AS400. And ideas?
Re: [U2] Job won't run
One thing I would do is to add 21 to the end of every line that contains a $LOG or $LOG. This will redirect any error messages from stderr to the log file as well. Then you can check the log file to see if any type of error is occurring. It may be that your script isn't even starting udt. Also curious why you're using the EOD syntax instead of simply doing: $UDTBIN/udt PHANTOM RUN GD-BPGM EXTRACT_FPO -N Which would create a como file in _PH_, in which you could also look for errors. What happens if you run the script from a Linux command prompt? BTW, there's nothing in your script that requires ksh. You could replace the #!/usr/bin/ksh with either : or #!/usr/bin/bash, and it should run fine. Larry Hiscock Western Computer Services -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of charles_shaf...@ntn-bower.com Sent: Friday, August 05, 2011 8:27 AM To: U2 Users List Subject: [U2] Job won't run I have run into something I have never seen before. We exchange a lot of data with an AS400 in Chicago. For many years we have taken the approach that the AS400 would submit a job to our UNIX box that would run a script. Many of the scripts run a Unibasic program and send the resulting file back to the AS400. This happens several times a day and we have been doing this for many years. One job has started doing something odd. It runs the script and transfers the file, but never runs the Unibasic program, so it has been resending an old version of the file. This seems to have started happening 3 days ago. I can log in manually using the same credentials as the remote job, and run the script by typing it in at the command line. It runs perfectly. Unibasic program runs, new file is sent to the AS400. There is joy. I have checked permissions. Nothing has changed at the AS400 end. Nothing has changed here. (That we know of). I have rechecked the code of he script and the Unibasic program. Looks good. I am stumped. Here is the script code. #!/usr/bin/ksh #Sends FILES_AS400/BOWER_FPO to AS400 as BOWER_FPO LOG=/NTN/DATA/CORPORATE/FILES_LOG/BOWER_FPO.LOG rm $LOG touch $LOG cd /NTN/DATA/CORPORATE echo `date` Extracting Firm Planned Orders to BOWER_FPO $LOG $UDTBIN/udtEOD$LOG RUN GD-BPGM EXTRACT_FPO -N bye EOD echo Sending Firm Planned Orders to AS400 730 $LOG /usr/local/rputj.scr CORP BOWER_FPO FILES_AS400/BOWER_FPO BOWER_FPO echo `date` Finished sending Firm Planned Orders $LOG This runs perfectly when run from CL, but not when submitted from the AS400. And ideas? Charles Shaffer Senior Analyst NTN-Bower Corporation ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Job won't run
I will try the 21. That might be informative. I can log in locally as the same user that remotely logs in and run the script no problem, including the unidata session. Thanks. Charles Shaffer Senior Analyst NTN-Bower Corporation Larry Hiscock lar...@wcs-corp.com Sent by: u2-users-boun...@listserver.u2ug.org 08/05/2011 11:42 AM Please respond to U2 Users List To: 'U2 Users List' u2-users@listserver.u2ug.org cc: Subject:Re: [U2] Job won't run One thing I would do is to add 21 to the end of every line that contains a $LOG or $LOG. This will redirect any error messages from stderr to the log file as well. Then you can check the log file to see if any type of error is occurring. It may be that your script isn't even starting udt. Also curious why you're using the EOD syntax instead of simply doing: $UDTBIN/udt PHANTOM RUN GD-BPGM EXTRACT_FPO -N Which would create a como file in _PH_, in which you could also look for errors. What happens if you run the script from a Linux command prompt? BTW, there's nothing in your script that requires ksh. You could replace the #!/usr/bin/ksh with either : or #!/usr/bin/bash, and it should run fine. Larry Hiscock Western Computer Services -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of charles_shaf...@ntn-bower.com Sent: Friday, August 05, 2011 8:27 AM To: U2 Users List Subject: [U2] Job won't run I have run into something I have never seen before. We exchange a lot of data with an AS400 in Chicago. For many years we have taken the approach that the AS400 would submit a job to our UNIX box that would run a script. Many of the scripts run a Unibasic program and send the resulting file back to the AS400. This happens several times a day and we have been doing this for many years. One job has started doing something odd. It runs the script and transfers the file, but never runs the Unibasic program, so it has been resending an old version of the file. This seems to have started happening 3 days ago. I can log in manually using the same credentials as the remote job, and run the script by typing it in at the command line. It runs perfectly. Unibasic program runs, new file is sent to the AS400. There is joy. I have checked permissions. Nothing has changed at the AS400 end. Nothing has changed here. (That we know of). I have rechecked the code of he script and the Unibasic program. Looks good. I am stumped. Here is the script code. #!/usr/bin/ksh #Sends FILES_AS400/BOWER_FPO to AS400 as BOWER_FPO LOG=/NTN/DATA/CORPORATE/FILES_LOG/BOWER_FPO.LOG rm $LOG touch $LOG cd /NTN/DATA/CORPORATE echo `date` Extracting Firm Planned Orders to BOWER_FPO $LOG $UDTBIN/udtEOD$LOG RUN GD-BPGM EXTRACT_FPO -N bye EOD echo Sending Firm Planned Orders to AS400 730 $LOG /usr/local/rputj.scr CORP BOWER_FPO FILES_AS400/BOWER_FPO BOWER_FPO echo `date` Finished sending Firm Planned Orders $LOG This runs perfectly when run from CL, but not when submitted from the AS400. And ideas? Charles Shaffer Senior Analyst NTN-Bower Corporation ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Job won't run
George Are you sure it's running ok? Did you remove the output file before you ran as that user? When we first noticed the problem, I logged in as the remote user and ran it from CL, and the folks in Chicago saw right away that the records were updated. Orders they were missing were now there. It definitely seems to be related to the difference between logging in locally or remotely. Charles Shaffer Senior Analyst NTN-Bower Corporation George Gallen ggal...@wyanokegroup.com Sent by: u2-users-boun...@listserver.u2ug.org 08/05/2011 12:52 PM Please respond to U2 Users List To: U2 Users List u2-users@listserver.u2ug.org cc: Subject:Re: [U2] Job won't run Are you sure it's running ok? Did you remove the output file before you ran as that user? I say that, because if you ran it ok from the CL as you, then tried as the user and it didn't update the file, you wouldn't know, would it have been the same since you ran it from the CL? Maybe a better test would be to copy a couple random lines of text into that file Then test it. This way you will know if the file contents are changing? -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- boun...@listserver.u2ug.org] On Behalf Of charles_shaf...@ntn-bower.com Sent: Friday, August 05, 2011 1:57 PM To: U2 Users List Subject: Re: [U2] Job won't run I will try the 21. That might be informative. I can log in locally as the same user that remotely logs in and run the script no problem, including the unidata session. Thanks. Charles Shaffer Senior Analyst NTN-Bower Corporation Larry Hiscock lar...@wcs-corp.com Sent by: u2-users-boun...@listserver.u2ug.org 08/05/2011 11:42 AM Please respond to U2 Users List To: 'U2 Users List' u2-users@listserver.u2ug.org cc: Subject:Re: [U2] Job won't run One thing I would do is to add 21 to the end of every line that contains a $LOG or $LOG. This will redirect any error messages from stderr to the log file as well. Then you can check the log file to see if any type of error is occurring. It may be that your script isn't even starting udt. Also curious why you're using the EOD syntax instead of simply doing: $UDTBIN/udt PHANTOM RUN GD-BPGM EXTRACT_FPO -N Which would create a como file in _PH_, in which you could also look for errors. What happens if you run the script from a Linux command prompt? BTW, there's nothing in your script that requires ksh. You could replace the #!/usr/bin/ksh with either : or #!/usr/bin/bash, and it should run fine. Larry Hiscock Western Computer Services -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of charles_shaf...@ntn-bower.com Sent: Friday, August 05, 2011 8:27 AM To: U2 Users List Subject: [U2] Job won't run I have run into something I have never seen before. We exchange a lot of data with an AS400 in Chicago. For many years we have taken the approach that the AS400 would submit a job to our UNIX box that would run a script. Many of the scripts run a Unibasic program and send the resulting file back to the AS400. This happens several times a day and we have been doing this for many years. One job has started doing something odd. It runs the script and transfers the file, but never runs the Unibasic program, so it has been resending an old version of the file. This seems to have started happening 3 days ago. I can log in manually using the same credentials as the remote job, and run the script by typing it in at the command line. It runs perfectly. Unibasic program runs, new file is sent to the AS400. There is joy. I have checked permissions. Nothing has changed at the AS400 end. Nothing has changed here. (That we know of). I have rechecked the code of he script and the Unibasic program. Looks good. I am stumped. Here is the script code. #!/usr/bin/ksh #Sends FILES_AS400/BOWER_FPO to AS400 as BOWER_FPO LOG=/NTN/DATA/CORPORATE/FILES_LOG/BOWER_FPO.LOG rm $LOG touch $LOG cd /NTN/DATA/CORPORATE echo `date` Extracting Firm Planned Orders to BOWER_FPO $LOG $UDTBIN/udtEOD$LOG RUN GD-BPGM EXTRACT_FPO -N bye EOD echo Sending Firm Planned Orders to AS400 730 $LOG /usr/local/rputj.scr CORP BOWER_FPO FILES_AS400/BOWER_FPO BOWER_FPO echo `date` Finished sending Firm Planned Orders $LOG This runs perfectly when run from CL, but not when submitted from the AS400. And ideas? Charles Shaffer Senior Analyst NTN-Bower Corporation ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org
Re: [U2] Job won't run
George what if you throw a whoami, groups and env into the script and check your logfile against those values when your on the CL, to see if anything jumps out. Good idea. I just ran it from CL with the additional information. It ran fine, and everything looks as I would expect. Monday morning, I will get a log of the remote job submission and compare. Thanks. Charles Shaffer Senior Analyst NTN-Bower Corporation ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
[U2] uniobjects question
Today I had an interesting discussion with a java developer about uniobjects and while I am going to run a test for myself I thought I would throw out my question to see what others know about this. The question is can you write a java or .net application that can call a subroutine (via uniobjects) that prompts a user for input and somehow have the have the front end process (java, .net, php or something else your choice) somehow send/feed it a response and get data back? for example (silly I know) SUBROUTINE GET.NAME(UNAME) PRINT @(-1) PRINT 'Enter your name: ': INPUT USER.NAME UNAME = 'the user said his name was ':USER.NAME RETURN ok so maybe the @(-1) is not really needed but you get the idea …… now can I call this subroutine via uniobjects and send it doug and get back the user said his name was doug my thinking is that the uniobjects session will time out waiting for the subroutine to return, I'll do a test this week-end but I would be very interested in seeing others thoughts on this and no inter call or other solution, this is strictly a uniobjects exercise thanks dougc ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] uniobjects question
This has been a problem with UniObjects from the beginning. When you are performing a subroutine which hits an INPUT, it just never comes back. You have to be doing an execute, which picks up everything put out with CRT etc and waits for input. On filling the input, it continues. Desired behaviour. It was quite easy to write 3 UV programs, using COMMON. Write a UVO subroutine to call a UV subroutine to store subroutine name, number of variables, and the variable values. This does so little that it has virtually no chance of not succeeding, so should come back. Then an execute of a UV program to call the subroutine using the stored data, and storing the results. Then execue a subroutine to get the results back. We have special functions to signal the UVO with what we want it to do in the inputs during execution of the subroutine. We use Char(127) as delimiter for operation code, then whatever is required after it, depending on the operation. This is useful for asking a question, showing counts, showing progress messages, etc. HTH, Kate -- Kate Stanton Walstan Systems Ltd 4 Kelmarna Ave, Herne Bay, Auckland 1011, New Zealand Phone: + 64 9 360 5310 Mobile: + 64 21 400 486 Email: k...@walstan.com On 6 August 2011 13:50, douglas chanco d...@chancofamily.com wrote: Today I had an interesting discussion with a java developer about uniobjects and while I am going to run a test for myself I thought I would throw out my question to see what others know about this. The question is can you write a java or .net application that can call a subroutine (via uniobjects) that prompts a user for input and somehow have the have the front end process (java, .net, php or something else your choice) somehow send/feed it a response and get data back? for example (silly I know) SUBROUTINE GET.NAME(UNAME) PRINT @(-1) PRINT 'Enter your name: ': INPUT USER.NAME UNAME = 'the user said his name was ':USER.NAME RETURN ok so maybe the @(-1) is not really needed but you get the idea …… now can I call this subroutine via uniobjects and send it doug and get back the user said his name was doug my thinking is that the uniobjects session will time out waiting for the subroutine to return, I'll do a test this week-end but I would be very interested in seeing others thoughts on this and no inter call or other solution, this is strictly a uniobjects exercise thanks dougc ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users