INFO-VAX Tue, 04 Dec 2007 Volume 2007 : Issue 663 Contents: Re: 20+ year old encrypted source code Re: 20+ year old encrypted source code Re: 20+ year old encrypted source code ANN: soyMAIL v1.4 is now available Re: comp.os.vms to ITRC gateway ? FW: Passing large number of arguments to a program Re: FW: Passing large number of arguments to a program Re: FW: Passing large number of arguments to a program Re: FW: Passing large number of arguments to a program RE: FW: Passing large number of arguments to a program RE: FW: Passing large number of arguments to a program RE: FW: Passing large number of arguments to a program Re: FW: Passing large number of arguments to a program Re: FW: Passing large number of arguments to a program Re: FW: Passing large number of arguments to a program Re: FW: Passing large number of arguments to a program Re: FW: Passing large number of arguments to a program Re: FW: Passing large number of arguments to a program Re: FW: Passing large number of arguments to a program Re: Itanium / Integrity question Re: Itanium / Integrity question MSL5000 Tape Library tape cleaning? Re: MSL5000 Tape Library tape cleaning? Re: MSL5000 Tape Library tape cleaning? Re: MSL5000 Tape Library tape cleaning? Re: MSL5000 Tape Library tape cleaning? Re: MSL5000 Tape Library tape cleaning? Re: MSL5000 Tape Library tape cleaning? Re: MSL5000 Tape Library tape cleaning? Re: MSL5000 Tape Library tape cleaning? Re: MSL5000 Tape Library tape cleaning? Re: MSL5000 Tape Library tape cleaning? Re: Passing large number of arguments to a program Re: Singapore Server Rescue Re: Singapore Server Rescue The real way to get on top of GOOGLE... validate username/password against UAF using java ? Re: validate username/password against UAF using java ? Re: validate username/password against UAF using java ? Re: validate username/password against UAF using java ? Walk a mile in their thongs Re: Walk a mile in their thongs Re: Walk a mile in their thongs WANTED: PDSDUMP information from VAX 780 (c1987) ---------------------------------------------------------------------- Date: 3 Dec 2007 19:21:14 GMT From: billg999@cs.uofs.edu (Bill Gunshannon) Subject: Re: 20+ year old encrypted source code Message-ID: <5rj39aF14pi4cU1@mid.individual.net> In article , moroney@world.std.spaamtrap.com (Michael Moroney) writes: > billg999@cs.uofs.edu (Bill Gunshannon) writes: > >>In article <47537cd1$0$90276$14726298@news.sunsite.dk>, >> Arne Vajhřj writes: >>> Richard B. Gilbert wrote: >>>> ISTR that some BASIC interpreters allowed you to encrypt the source! It >>>> seemed like a dumb thing to do and I never tried it. . . . >>> >>> I did in the early DOS days. >>> >>> It was a type of protection of the source code in an interpreted >>> context. >>> > >>I don't remember any of the original microcomputer BASIC's that >>encrypted their source. Almost all of them used "tokenization" >>of all reserved words which may have looked like encryption as >>it was definitely not ASCII. > > Yes, that was done to save a few valuable bytes on disk or memory, not > for encryption. I suspect "tokenized" BASIC would have recognizable code > or text, particularly the rest of a PRINT statement, so the unrecognizable > code is unlikely "tokenized" BASIC code. I realize that, I was just countering the notion that early BASIC's wasted valuable resources on something like encryiption. If anything, these may be compressed but even that seems unlikely. I suggest that if unable to find the originator and ask him what the story is, recovery is highly unlikely. bill -- Bill Gunshannon | de-moc-ra-cy (di mok' ra see) n. Three wolves bill@cs.scranton.edu | and a sheep voting on what's for dinner. University of Scranton | Scranton, Pennsylvania | #include ------------------------------ Date: Mon, 3 Dec 2007 15:11:50 -0500 From: "Peter Weaver" Subject: Re: 20+ year old encrypted source code Message-ID: <301601c835e8$bd9236a0$2802a8c0@CHARONLAP> > Here are the first and last block of one file, generated using the > $DUMP command. This is supposed to be a file containing BASIC source > code. (Apologies for the formatting, but I don't think I can force it >... Does it has a .BAS extension? In the early 80's Jay Beller created a program that he named SCRAMBLE that would encrypt a file, create a new version and purge away the old version. His program was popular among sites that ran ADMINS/V32. If your site every had ADMINS/V32 then look for a SCRAMBLE.EXE. If that fails then posts some details about where you are and what other applications are on the box and someone here might recognize something for you. Peter Weaver www.weaverconsulting.ca CHARON-VAX CHARON-AXP DataStream Reflection PreciseMail HP Commercial Hardware ------------------------------ Date: Mon, 03 Dec 2007 17:29:27 -0500 From: JF Mezei Subject: Re: 20+ year old encrypted source code Message-ID: <552f0$47548348$cef8887a$24537@TEKSAVVY.COM> Bill Gunshannon wrote: > I realize that, I was just countering the notion that early BASIC's > wasted valuable resources on something like encryiption. If it were "tokenised" (aka: parsed source code to make the interpreter's job easier), you would still be able to see textual constants inside the jibberish. (aka: the "Hello World" in "print "Hello World") would still be readable inside the binary file. ------------------------------ Date: Tue, 04 Dec 2007 18:19:56 +1030 From: Mark Daniel Subject: ANN: soyMAIL v1.4 is now available Message-ID: <13l9u5n76cc3lf7@corp.supernews.com> soyMAIL v1.4 is now available from the WASD download page http://wasd.vsm.com.au/wasd/ This is more of a refinement and bugfix release than containing anything completely new or significant. Nevertheless it's probably better that these regularly be out and in use than languishing on some dusty drive inside my system. The release notes are available http://wasd.vsm.com.au/soymail/-/release_notes.txt and for any who may be unfamiliar with soyMAIL http://wasd.vsm.com.au/ht_root/src/soymail/doc/soymail_overview.html http://wasd.vsm.com.au/ht_root/src/soymail/doc/soymail_admin.html You would have seen the announcement earlier at http://openvms.org/ !! ------------------------------ Date: Mon, 3 Dec 2007 22:20:06 +0000 (UTC) From: helbig@astro.multiCLOTHESvax.de (Phillip Helbig---remove CLOTHES to reply) Subject: Re: comp.os.vms to ITRC gateway ? Message-ID: In article , JF Mezei writes: > OK, some middle of the night in very cold weather just before a snow > storm idea: > > Conceptually, how about a c.o.v to ITRC gateway, similar to the info-vax > gateway ? Posts made on any one of those gets propagated to the other ? Why? > Granted, the ITRC moderators would have a bigger jobs of deleting all > the posts they judge to be inappropriate on an HP site, but in the end, > it would reduce the fragmentation of an already small community. Why should they want the extra work? > Perhaps the ITRC gateway could be unidirectional (ITRC to c.o.v.) which > would eliminate the moderation work, but still allow people to benefit > from whatever disscussions happen over there (and especially since such > would get archived as c.o.v. posts in deja news (google). This would make more sense, IF they could be properly formatted as usenet posts readable and threadable in an ordinary newsreader. Personally (and, coincidentally, I'm having an email conversation about this right now involving other newsgroups and other forums), I don't like forums. The commands, syntax, look and feel etc differ from forum to forum, I need a (sometimes fancy) web browser, I can't write stuff in EDT and it is not easy to kill entire threads. To keep the noise level down, there are moderated newsgroups. Having been a co-moderator of a newsgroup for a decade, once one gets things properly set up it is definitely less work, from a technical point of view, than moderating a forum. A better goal, in my opinion, would be comp.os.vms.moderated, if there really is a need to keep the noise level down. I would even volunteer to moderate it! However, it would probably need 5--10 co-moderators to keep the load on each one at a reasonable level. ------------------------------ Date: Mon, 3 Dec 2007 15:11:08 -0500 From: "Farrell, Michael" Subject: FW: Passing large number of arguments to a program Message-ID: <8330CD39B64C934DBE63CB6D4CEE37D0382D2C@NJ103EX2.EAST.VIS.COM> This is a multi-part message in MIME format. ------_=_NextPart_001_01C835E8.A549C173 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable One of my programmers wrote a program that receives a huge = (embarassingly huge) number of arguments. =20 The program is run through a DCL jacket procedure that develops the = arguments and calls the program. =20 =20 If the number of arguments exceeds 143, not the leading argument, but = the following leading arguments get clobbered. (When 144 arguments are used, arguments 2 and 3 get clobbered.) =20 The program below is a stub program that shows this condition. There = are 4 runs shown here. One for 143 arguments where all is fine, and one = each for 144, 156, and 170 arguments where an increasing number of the = leading arguments starting with argument 1 gets clobbered. (Note that = if you run this you can always see that "varg[0]" is correct, always = showing the exact version of the program name being executed.) =20 Yes, passing a ridiculous number of arguments does bring new meaning to = the expression "quick and dirty programming". And yes, there is a = better way to do it, and yes, that change is being made now. =20 But, what went on here? Is DCL involved in this problem? Can someone = explain what could be involved? =20 We are running "HP C V7.1-015 on OpenVMS Alpha V8.3". The original = program was linked with a "STACK=3D200" command in the link options file = but I'm not sure if this. =20 =20 Any insight will be greatly appreciated. =20 Thanks =20 Mike =20 Mike Farrell VoltDelta Resources, LLC =20 =20 G> cc test_args.c ! Std "cc" command G> link test_args ! Std "link" command =20 =20 Directory $1$DKA100:[XXXX] =20 TEST_ARGS.C;4 0.50KB/34KB = 3-DEC-2007 10:59:41.99 TEST_ARGS.COM;3 1KB/34KB = 3-DEC-2007 11:11:17.58 TEST_ARGS.EXE;4 3KB/34KB = 3-DEC-2007 10:59:45.10 TEST_ARGS.OBJ;4 2KB/34KB = 3-DEC-2007 10:59:43.69 =20 Total of 4 files, 7KB/138KB G> =20 =20 =20 =20 G> ty TEST_ARGS.COM $! TEST_ARGS.COM $! ------------- $! P1 - number of command line arguments to test $! $! This test procedure will generate requested number of command line = arguments as "1 2 3 ...", and $! will attempt to run TEST_ARGS.EXE program while passing all those = arguments. The program will attempt $! to simply print the list of command line arguments. $! $ if (f$type(P1) .nes. "INTEGER") then exit 4 $! $ n =3D 0 $ args =3D "" $ max =3D P1 $LOOP: $ n =3D n + 1 $ if (n .gt. max) then goto FINISH $ args =3D args + " ''n'" $ goto LOOP $FINISH: $! $ prog :=3D $ $1$DKA100:[IGOR.SPB2ASC.REL_058]TEST_ARGS.EXE $ set verify $ prog 'args' $ set noverify $ exit G> =20 =20 =20 G> type TEST_ARGS.c #include =20 main(int narg, char *varg[]) { =20 int n; =20 for (n =3D 0; n < narg; n++) printf(" Arg %d: %s;", n, varg[n]); } G> =20 =20 =20 =20 G> @test_args 143 $ prog 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 = 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 = 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 = 99 100 101 102 103 104 105 106 107 10 8 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 = 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 Arg 0: $1$dka100:[XXXX]test_args.exe;4; Arg 1: 1; Arg 2: 2; Arg 3: = 3; Arg 4: 4; Arg 5: 5; Arg 6: 6; Arg 7: 7; Arg 8: 8; Arg 9: 9; Arg 10: 10; Arg 11: 11; = Arg 12: 12; Arg 13: 13; Arg 14: 14 ; Arg 15: 15; Arg 16: 16; Arg 17: 17; Arg 18: 18; Arg 19: 19; Arg = 20: 20; Arg 21: 21; Arg 22: 22; Arg 23: 23; Arg 24: 24; Arg 25: 25; Arg 26: 26; Arg 27: 27; Arg 28: = 28; Arg 29: 29; Arg 30: 30; Arg 31: 3 1; Arg 32: 32; Arg 33: 33; Arg 34: 34; Arg 35: 35; Arg 36: 36; Arg = 37: 37; Arg 38: 38; Arg 39: 39; Ar g 40: 40; Arg 41: 41; Arg 42: 42; Arg 43: 43; Arg 44: 44; Arg 45: = 45; Arg 46: 46; Arg 47: 47; Arg 48: 48; Arg 49: 49; Arg 50: 50; Arg 51: 51; Arg 52: 52; Arg 53: 53; = Arg 54: 54; Arg 55: 55; Arg 56: 56; A rg 57: 57; Arg 58: 58; Arg 59: 59; Arg 60: 60; Arg 61: 61; Arg 62: = 62; Arg 63: 63; Arg 64: 64; Arg 65: 65; Arg 66: 66; Arg 67: 67; Arg 68: 68; Arg 69: 69; Arg 70: 70; = Arg 71: 71; Arg 72: 72; Arg 73: 73; Arg 74: 74; Arg 75: 75; Arg 76: 76; Arg 77: 77; Arg 78: 78; Arg 79: = 79; Arg 80: 80; Arg 81: 81; Arg 82 : 82; Arg 83: 83; Arg 84: 84; Arg 85: 85; Arg 86: 86; Arg 87: 87; = Arg 88: 88; Arg 89: 89; Arg 90: 90; Arg 91: 91; Arg 92: 92; Arg 93: 93; Arg 94: 94; Arg 95: 95; Arg = 96: 96; Arg 97: 97; Arg 98: 98; Arg 9 9: 99; Arg 100: 100; Arg 101: 101; Arg 102: 102; Arg 103: 103; Arg = 104: 104; Arg 105: 105; Arg 106: 106 ; Arg 107: 107; Arg 108: 108; Arg 109: 109; Arg 110: 110; Arg 111: = 111; Arg 112: 112; Arg 113: 113; Ar g 114: 114; Arg 115: 115; Arg 116: 116; Arg 117: 117; Arg 118: 118; = Arg 119: 119; Arg 120: 120; Arg 121 : 121; Arg 122: 122; Arg 123: 123; Arg 124: 124; Arg 125: 125; Arg = 126: 126; Arg 127: 127; Arg 128: 128 ; Arg 129: 129; Arg 130: 130; Arg 131: 131; Arg 132: 132; Arg 133: = 133; Arg 134: 134; Arg 135: 135; Ar g 136: 136; Arg 137: 137; Arg 138: 138; Arg 139: 139; Arg 140: 140; = Arg 141: 141; Arg 142: 142; Arg 143 : 143; $ set noverify G> G> G> @test_args 144 $ prog 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 = 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 = 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 = 99 100 101 102 103 104 105 106 107 10 8 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 = 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 Arg 0: $1$dka100:[XXXX]test_args.exe;4; Arg 1: D; Arg 2: ; Arg 3: = 3; Arg 4: 4; Arg 5: 5 ; Arg 6: 6; Arg 7: 7; Arg 8: 8; Arg 9: 9; Arg 10: 10; Arg 11: 11; = Arg 12: 12; Arg 13: 13; Arg 14: 14; Arg 15: 15; Arg 16: 16; Arg 17: 17; Arg 18: 18; Arg 19: 19; Arg = 20: 20; Arg 21: 21; Arg 22: 22; Arg 23: 23; Arg 24: 24; Arg 25: 25; Arg 26: 26; Arg 27: 27; Arg 28: 28; = Arg 29: 29; Arg 30: 30; Arg 31: 31 ; Arg 32: 32; Arg 33: 33; Arg 34: 34; Arg 35: 35; Arg 36: 36; Arg = 37: 37; Arg 38: 38; Arg 39: 39; Arg 40: 40; Arg 41: 41; Arg 42: 42; Arg 43: 43; Arg 44: 44; Arg 45: = 45; Arg 46: 46; Arg 47: 47; Arg 48: 4 8; Arg 49: 49; Arg 50: 50; Arg 51: 51; Arg 52: 52; Arg 53: 53; Arg = 54: 54; Arg 55: 55; Arg 56: 56; Ar g 57: 57; Arg 58: 58; Arg 59: 59; Arg 60: 60; Arg 61: 61; Arg 62: = 62; Arg 63: 63; Arg 64: 64; Arg 65: 65; Arg 66: 66; Arg 67: 67; Arg 68: 68; Arg 69: 69; Arg 70: 70; = Arg 71: 71; Arg 72: 72; Arg 73: 73; A rg 74: 74; Arg 75: 75; Arg 76: 76; Arg 77: 77; Arg 78: 78; Arg 79: = 79; Arg 80: 80; Arg 81: 81; Arg 82: 82; Arg 83: 83; Arg 84: 84; Arg 85: 85; Arg 86: 86; Arg 87: 87; = Arg 88: 88; Arg 89: 89; Arg 90: 90; Arg 91: 91; Arg 92: 92; Arg 93: 93; Arg 94: 94; Arg 95: 95; Arg 96: = 96; Arg 97: 97; Arg 98: 98; Arg 99 : 99; Arg 100: 100; Arg 101: 101; Arg 102: 102; Arg 103: 103; Arg = 104: 104; Arg 105: 105; Arg 106: 106; Arg 107: 107; Arg 108: 108; Arg 109: 109; Arg 110: 110; Arg 111: = 111; Arg 112: 112; Arg 113: 113; Arg 114: 114; Arg 115: 115; Arg 116: 116; Arg 117: 117; Arg 118: 118; = Arg 119: 119; Arg 120: 120; Arg 121: 121; Arg 122: 122; Arg 123: 123; Arg 124: 124; Arg 125: 125; Arg = 126: 126; Arg 127: 127; Arg 128: 128; Arg 129: 129; Arg 130: 130; Arg 131: 131; Arg 132: 132; Arg 133: = 133; Arg 134: 134; Arg 135: 135; Arg 136: 136; Arg 137: 137; Arg 138: 138; Arg 139: 139; Arg 140: 140; = Arg 141: 141; Arg 142: 142; Arg 143: 143; Arg 144: 144; $ set noverify G> G> G> @test_args 156 $ prog 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 = 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 = 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 = 99 100 101 102 103 104 105 106 107 10 8 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 = 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 = 154 155 156 Arg 0: $1$dka100:[XXXX]test_args.exe;4; Arg 1: D; Arg 2: ; Arg 3: = D; Arg 4: ; Arg 5: D; Arg 6: ; Arg 7: D; Arg 8: ; Arg 9: D; Arg 13: ; Arg 14: ; Arg = 15: D ; Arg 16: D; Arg 17: ; Arg 18: ; Arg 19: D; Arg 20: =B0D; Arg 21: = ; Arg 22: 22; Arg 23: 23; Arg 24: 24 ; Arg 25: 25; Arg 26: 26; Arg 27: 27; Arg 28: 28; Arg 29: 29; Arg = 30: 30; Arg 31: 31; Arg 32: 32; Arg 33: 33; Arg 34: 34; Arg 35: 35; Arg 36: 36; Arg 37: 37; Arg 38: = 38; Arg 39: 39; Arg 40: 40; Arg 41: 4 1; Arg 42: 42; Arg 43: 43; Arg 44: 44; Arg 45: 45; Arg 46: 46; Arg = 47: 47; Arg 48: 48; Arg 49: 49; Ar g 50: 50; Arg 51: 51; Arg 52: 52; Arg 53: 53; Arg 54: 54; Arg 55: = 55; Arg 56: 56; Arg 57: 57; Arg 58: 58; Arg 59: 59; Arg 60: 60; Arg 61: 61; Arg 62: 62; Arg 63: 63; = Arg 64: 64; Arg 65: 65; Arg 66: 66; A rg 67: 67; Arg 68: 68; Arg 69: 69; Arg 70: 70; Arg 71: 71; Arg 72: = 72; Arg 73: 73; Arg 74: 74; Arg 75: 75; Arg 76: 76; Arg 77: 77; Arg 78: 78; Arg 79: 79; Arg 80: 80; = Arg 81: 81; Arg 82: 82; Arg 83: 83; Arg 84: 84; Arg 85: 85; Arg 86: 86; Arg 87: 87; Arg 88: 88; Arg 89: = 89; Arg 90: 90; Arg 91: 91; Arg 92 : 92; Arg 93: 93; Arg 94: 94; Arg 95: 95; Arg 96: 96; Arg 97: 97; = Arg 98: 98; Arg 99: 99; Arg 100: 100 ; Arg 101: 101; Arg 102: 102; Arg 103: 103; Arg 104: 104; Arg 105: = 105; Arg 106: 106; Arg 107: 107; Ar g 108: 108; Arg 109: 109; Arg 110: 110; Arg 111: 111; Arg 112: 112; = Arg 113: 113; Arg 114: 114; Arg 115 : 115; Arg 116: 116; Arg 117: 117; Arg 118: 118; Arg 119: 119; Arg = 120: 120; Arg 121: 121; Arg 122: 122 ; Arg 123: 123; Arg 124: 124; Arg 125: 125; Arg 126: 126; Arg 127: = 127; Arg 128: 128; Arg 129: 129; Ar g 130: 130; Arg 131: 131; Arg 132: 132; Arg 133: 133; Arg 134: 134; = Arg 135: 135; Arg 136: 136; Arg 137 : 137; Arg 138: 138; Arg 139: 139; Arg 140: 140; Arg 141: 141; Arg = 142: 142; Arg 143: 143; Arg 144: 144 ; Arg 145: 145; Arg 146: 146; Arg 147: 147; Arg 148: 148; Arg 149: = 149; Arg 150: 150; Arg 151: 151; Ar g 152: 152; Arg 153: 153; Arg 154: 154; Arg 155: 155; Arg 156: 156; $ set noverify G> G> G> @test_args 170 $ prog 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 = 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 = 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 = 99 100 101 102 103 104 105 106 107 10 8 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 = 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 = 154 155 156 157 158 159 160 161 162 16 3 164 165 166 167 168 169 170 Arg 0: $1$dka100:[XXXX]test_args.exe;4; Arg 1: D; Arg 2: ; Arg 3: = D; Arg 4: ; Arg 5: D; Arg 6: ; Arg 7: D; Arg 8: ; Arg 9: D; Arg 13: ; Arg 14: ; Arg = 15: D ; Arg 16: D; Arg 17: ; Arg 18: ; Arg 19: D; Arg 20: =B0D; Arg 21: = ; Arg 22: ; Arg 23: D; Arg 24: =BCD; Arg 25: ; Arg 26: ; Arg 27: D; Arg 28: =C8D; Arg 29: ; Arg 30: ; = Arg 31: D; Arg 32: =D4D; Arg 33: ; Arg 3 4: ; Arg 35: D; Arg 36: =E0D; Arg 37: ; Arg 38: ; Arg 39: D; Arg = 40: 40; Arg 41: 41; Arg 42: 42; Arg 43 : 43; Arg 44: 44; Arg 45: 45; Arg 46: 46; Arg 47: 47; Arg 48: 48; = Arg 49: 49; Arg 50: 50; Arg 51: 51; Arg 52: 52; Arg 53: 53; Arg 54: 54; Arg 55: 55; Arg 56: 56; Arg = 57: 57; Arg 58: 58; Arg 59: 59; Arg 6 0: 60; Arg 61: 61; Arg 62: 62; Arg 63: 63; Arg 64: 64; Arg 65: 65; = Arg 66: 66; Arg 67: 67; Arg 68: 68; Arg 69: 69; Arg 70: 70; Arg 71: 71; Arg 72: 72; Arg 73: 73; Arg = 74: 74; Arg 75: 75; Arg 76: 76; Arg 77: 77; Arg 78: 78; Arg 79: 79; Arg 80: 80; Arg 81: 81; Arg 82: 82; = Arg 83: 83; Arg 84: 84; Arg 85: 85 ; Arg 86: 86; Arg 87: 87; Arg 88: 88; Arg 89: 89; Arg 90: 90; Arg = 91: 91; Arg 92: 92; Arg 93: 93; Arg 94: 94; Arg 95: 95; Arg 96: 96; Arg 97: 97; Arg 98: 98; Arg 99: = 99; Arg 100: 100; Arg 101: 101; Arg 1 02: 102; Arg 103: 103; Arg 104: 104; Arg 105: 105; Arg 106: 106; = Arg 107: 107; Arg 108: 108; Arg 109: 1 09; Arg 110: 110; Arg 111: 111; Arg 112: 112; Arg 113: 113; Arg = 114: 114; Arg 115: 115; Arg 116: 116; Arg 117: 117; Arg 118: 118; Arg 119: 119; Arg 120: 120; Arg 121: = 121; Arg 122: 122; Arg 123: 123; Arg 1 24: 124; Arg 125: 125; Arg 126: 126; Arg 127: 127; Arg 128: 128; = Arg 129: 129; Arg 130: 130; Arg 131: 1 31; Arg 132: 132; Arg 133: 133; Arg 134: 134; Arg 135: 135; Arg = 136: 136; Arg 137: 137; Arg 138: 138; Arg 139: 139; Arg 140: 140; Arg 141: 141; Arg 142: 142; Arg 143: = 143; Arg 144: 144; Arg 145: 145; Arg 1 46: 146; Arg 147: 147; Arg 148: 148; Arg 149: 149; Arg 150: 150; = Arg 151: 151; Arg 152: 152; Arg 153: 1 53; Arg 154: 154; Arg 155: 155; Arg 156: 156; Arg 157: 157; Arg = 158: 158; Arg 159: 159; Arg 160: 160; Arg 161: 161; Arg 162: 162; Arg 163: 163; Arg 164: 164; Arg 165: = 165; Arg 166: 166; Arg 167: 167; Arg 1 68: 168; Arg 169: 169; Arg 170: 170; $ set noverify G> G> ------_=_NextPart_001_01C835E8.A549C173 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

One = of my programmers wrote a program that receives a huge (embarassingly huge) = number of arguments.=A0

The = program is run through a DCL jacket procedure that develops the arguments and calls = the program.=A0

 

=

If = the number of arguments exceeds 143, not the leading argument, but the following = leading arguments get clobbered.

(When 144 arguments are used, arguments 2 and 3 get = clobbered.)

 

=

The = program below is a stub program that shows this condition.=A0 There are 4 runs = shown here. =A0One for 143 arguments where all is fine, and one each for 144, = 156, and 170 arguments where an increasing number of the leading arguments = starting with argument 1 gets clobbered.=A0 (Note that if you run this you can always = see that “varg[0]” is correct, always showing the exact version of the program name being executed.)

 

=

Yes, passing a ridiculous number of arguments does bring new meaning to the expression = “quick and dirty programming”. =A0And yes, there is a better way to do = it, and yes, that change is being made now.

 

=

But, what went on here?=A0 Is DCL involved in this problem? =A0Can someone explain what = could be involved?

 

=

We = are running “HP C V7.1-015 on OpenVMS Alpha V8.3”.=A0 The original = program was linked with a “STACK=3D200” command in the link options file = but I’m not sure if this. =A0

 

=

Any = insight will be greatly appreciated.

 

=

Thanks

=

 

=

Mike

 

=

Mike = Farrell

VoltDelta Resources, LLC

 

 

G> = cc   test_args.c=A0=A0=A0=A0=A0=A0=A0=A0=A0 ! Std “cc” command

G> link = test_args=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ! Std = “link” command

 

 

Directory = $1$DKA100:[XXXX]

 

TEST_ARGS.C;4         =             &= nbsp;           &n= bsp; 0.50KB/34KB        3-DEC-2007 = 10:59:41.99

TEST_ARGS.COM;3        &nbs= p;            = ;            =    1KB/34KB        3-DEC-2007 = 11:11:17.58

TEST_ARGS.EXE;4        &nbs= p;                   &= nbsp;       3KB/34KB   =      3-DEC-2007 10:59:45.10

TEST_ARGS.OBJ;4        &nbs= p;            = ;            =    2KB/34KB        3-DEC-2007 = 10:59:43.69

 

Total of 4 files, = 7KB/138KB

G>

 

 

 

 

G> ty = TEST_ARGS.COM

$! = TEST_ARGS.COM

$! = -------------

$! P1 - number of = command line arguments to test

$!

$! This test = procedure will generate requested number of command line arguments as "1 2 3 = ..", and

$! will attempt to = run TEST_ARGS.EXE program while passing all those arguments. The program = will attempt

$! to simply print = the list of command line arguments.

$!

$ if (f$type(P1) = nes. "INTEGER") then exit 4

$!

$ n =3D = 0

$ args =3D = ""

$ max =3D = P1

$LOOP:

$   n =3D = n + 1

$   if (n = gt. max) then goto FINISH

$   args = =3D args + " ''n'"

$   goto = LOOP

$FINISH:

$!

$ prog :=3D $ $1$DKA100:[IGOR.SPB2ASC.REL_058]TEST_ARGS.EXE

$ set = verify

$ prog = 'args'

$ set = noverify

$ = exit

G>

 

 

 

G> type = TEST_ARGS.c

#include = <stdio>

 

main(int narg, char = *varg[]) {

 

    = int n;

 

    = for (n =3D 0; n < narg; n++) printf("  Arg %d: %s;", n, = varg[n]);

}

G>

 

 

 

 

G> @test_args = 143

$ prog  1 2 3 = 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 = 33 34 35 36 37

38 39 40 41 42 43 = 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 = 71 72 73 74

 75 76 77 78 = 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 = 104 105 106 107 10

8 109 110 111 112 = 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 = 133 134 135

136 137 138 139 140 = 141 142 143

  Arg 0: = $1$dka100:[XXXX]test_args.exe;4;  Arg 1: 1;  Arg 2: 2;  Arg 3: 3;  Arg 4: 4;  Arg = 5:

5;  Arg 6: = 6;  Arg 7: 7;  Arg 8: 8;  Arg 9: 9;  Arg 10: 10;  Arg 11: = 11;  Arg 12: 12;  Arg 13: 13;  Arg 14: = 14

;  Arg 15: = 15;  Arg 16: 16;  Arg 17: 17;  Arg 18: 18;  Arg 19: 19;  = Arg 20: 20;  Arg 21: 21;  Arg 22: 22;  = Arg

 23: 23;  = Arg 24: 24;  Arg 25: 25;  Arg 26: 26;  Arg 27: 27;  Arg 28: 28;  Arg 29: 29;  Arg 30: 30;  Arg 31: = 3

1;  Arg 32: = 32;  Arg 33: 33;  Arg 34: 34;  Arg 35: 35;  Arg 36: 36;  = Arg 37: 37;  Arg 38: 38;  Arg 39: 39;  = Ar

g 40: 40;  Arg = 41: 41;  Arg 42: 42;  Arg 43: 43;  Arg 44: 44;  Arg 45: 45;  Arg 46: 46;  Arg 47: 47;  Arg = 48:

48;  Arg 49: = 49;  Arg 50: 50;  Arg 51: 51;  Arg 52: 52;  Arg 53: 53;  = Arg 54: 54;  Arg 55: 55;  Arg 56: 56;  = A

rg 57: 57;  = Arg 58: 58;  Arg 59: 59;  Arg 60: 60;  Arg 61: 61;  Arg 62: 62;  Arg 63: 63;  Arg 64: 64;  Arg = 65:

 65;  Arg = 66: 66;  Arg 67: 67;  Arg 68: 68;  Arg 69: 69;  Arg 70: 70;  Arg 71: 71;  Arg 72: 72;  Arg 73: = 73;

Arg 74: 74;  = Arg 75: 75;  Arg 76: 76;  Arg 77: 77;  Arg 78: 78;  Arg 79: 79;  Arg 80: 80;  Arg 81: 81;  Arg = 82

: 82;  Arg 83: 83;  Arg 84: 84;  Arg 85: 85;  Arg 86: 86;  Arg 87: 87;  Arg 88: 88;  Arg 89: 89;  Arg 90: = 90;

 Arg 91: = 91;  Arg 92: 92;  Arg 93: 93;  Arg 94: 94;  Arg 95: 95;  Arg = 96: 96;  Arg 97: 97;  Arg 98: 98;  Arg = 9

9: 99;  Arg = 100: 100;  Arg 101: 101;  Arg 102: 102;  Arg 103: 103;  = Arg 104: 104;  Arg 105: 105;  Arg 106: 106

;  Arg 107: = 107;  Arg 108: 108;  Arg 109: 109;  Arg 110: 110;  Arg 111: = 111;  Arg 112: 112;  Arg 113: 113;  Ar

g 114: 114;  = Arg 115: 115;  Arg 116: 116;  Arg 117: 117;  Arg 118: 118;  = Arg 119: 119;  Arg 120: 120;  Arg 121

: 121;  Arg = 122: 122;  Arg 123: 123;  Arg 124: 124;  Arg 125: 125;  = Arg 126: 126;  Arg 127: 127;  Arg 128: 128

;  Arg 129: = 129;  Arg 130: 130;  Arg 131: 131;  Arg 132: 132;  Arg 133: = 133;  Arg 134: 134;  Arg 135: 135;  Ar

g 136: 136;  = Arg 137: 137;  Arg 138: 138;  Arg 139: 139;  Arg 140: 140;  = Arg 141: 141;  Arg 142: 142;  Arg 143

: = 143;

$ set = noverify

G>

G>

G> @test_args = 144

$ prog  1 2 3 = 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 = 33 34 35 36 37

38 39 40 41 42 43 = 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 = 71 72 73 74

 75 76 77 78 = 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 = 105 106 107 10

8 109 110 111 112 = 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 = 133 134 135

136 137 138 139 140 = 141 142 143 144

  Arg 0: = $1$dka100:[XXXX]test_args.exe;4;  Arg 1: D;  Arg 2: ;  Arg = 3: 3;  Arg 4: 4;  Arg 5: 5

;  Arg 6: = 6;  Arg 7: 7;  Arg 8: 8;  Arg 9: 9;  Arg 10: 10;  Arg 11: = 11;  Arg 12: 12;  Arg 13: 13;  Arg 14: = 14;

  Arg 15: = 15;  Arg 16: 16;  Arg 17: 17;  Arg 18: 18;  Arg 19: 19;  Arg = 20: 20;  Arg 21: 21;  Arg 22: 22;  = Arg

23: 23;  Arg = 24: 24;  Arg 25: 25;  Arg 26: 26;  Arg 27: 27;  Arg 28: 28;  Arg 29: 29;  Arg 30: 30;  Arg 31: = 31

;  Arg 32: = 32;  Arg 33: 33;  Arg 34: 34;  Arg 35: 35;  Arg 36: 36;  = Arg 37: 37;  Arg 38: 38;  Arg 39: 39;  = Arg

 40: 40;  = Arg 41: 41;  Arg 42: 42;  Arg 43: 43;  Arg 44: 44;  Arg 45: 45;  Arg 46: 46;  Arg 47: 47;  Arg 48: = 4

8;  Arg 49: = 49;  Arg 50: 50;  Arg 51: 51;  Arg 52: 52;  Arg 53: 53;  = Arg 54: 54;  Arg 55: 55;  Arg 56: 56;  = Ar

g 57: 57;  Arg = 58: 58;  Arg 59: 59;  Arg 60: 60;  Arg 61: 61;  Arg 62: 62;  Arg 63: 63;  Arg 64: 64;  Arg = 65:

65;  Arg 66: = 66;  Arg 67: 67;  Arg 68: 68;  Arg 69: 69;  Arg 70: 70;  = Arg 71: 71;  Arg 72: 72;  Arg 73: 73;  = A

rg 74: 74;  = Arg 75: 75;  Arg 76: 76;  Arg 77: 77;  Arg 78: 78;  Arg 79: 79;  Arg 80: 80;  Arg 81: 81;  Arg = 82:

 82;  Arg = 83: 83;  Arg 84: 84;  Arg 85: 85;  Arg 86: 86;  Arg 87: 87;  Arg 88: 88;  Arg 89: 89;  Arg 90: = 90;

Arg 91: 91;  = Arg 92: 92;  Arg 93: 93;  Arg 94: 94;  Arg 95: 95;  Arg 96: 96;  Arg 97: 97;  Arg 98: 98;  Arg = 99

: 99;  Arg = 100: 100;  Arg 101: 101;  Arg 102: 102;  Arg 103: 103;  = Arg 104: 104;  Arg 105: 105;  Arg 106: = 106;

  Arg 107: = 107;  Arg 108: 108;  Arg 109: 109;  Arg 110: 110;  Arg 111: = 111;  Arg 112: 112;  Arg 113: 113;  Arg

 114: = 114;  Arg 115: 115;  Arg 116: 116;  Arg 117: 117;  Arg 118: = 118;  Arg 119: 119;  Arg 120: 120;  Arg = 121:

 121;  = Arg 122: 122;  Arg 123: 123;  Arg 124: 124;  Arg 125: 125;  = Arg 126: 126;  Arg 127: 127;  Arg 128: = 128;

  Arg 129: = 129;  Arg 130: 130;  Arg 131: 131;  Arg 132: 132;  Arg 133: = 133;  Arg 134: 134;  Arg 135: 135;  Arg

 136: = 136;  Arg 137: 137;  Arg 138: 138;  Arg 139: 139;  Arg 140: = 140;  Arg 141: 141;  Arg 142: 142;  Arg = 143:

 143;  = Arg 144: 144;

$ set = noverify

G>

G>

G> @test_args = 156

$ prog  1 2 3 = 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 = 33 34 35 36 37

38 39 40 41 42 43 = 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 = 71 72 73 74

 75 76 77 78 = 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 = 104 105 106 107 10

8 109 110 111 112 = 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 = 133 134 135

136 137 138 139 140 = 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 = 156

  Arg 0: = $1$dka100:[XXXX]test_args.exe;4;  Arg 1: D;  Arg 2: ;  Arg = 3:

        &n= bsp;           &nb= sp;           &nbs= p;            = ;            =             &= nbsp;           &n= bsp;     D;  Arg 4: ;  Arg 5: D;

  Arg 6: ;  Arg 7: D;  Arg 8: ;  Arg 9: D;  Arg 13: = ;  Arg 14: ;  Arg 15: D

;  Arg 16:  D;  Arg 17: ;  Arg 18: ;  Arg 19: D;  Arg = 20: =B0D;  Arg 21: ;  Arg 22: = 22;  Arg 23: 23;  Arg 24: 24

;  Arg 25: = 25;  Arg 26: 26;  Arg 27: 27;  Arg 28: 28;  Arg 29: 29;  = Arg 30: 30;  Arg 31: 31;  Arg 32: 32;  = Arg

 33: 33;  = Arg 34: 34;  Arg 35: 35;  Arg 36: 36;  Arg 37: 37;  Arg 38: 38;  Arg 39: 39;  Arg 40: 40;  Arg 41: = 4

1;  Arg 42: = 42;  Arg 43: 43;  Arg 44: 44;  Arg 45: 45;  Arg 46: 46;  = Arg 47: 47;  Arg 48: 48;  Arg 49: 49;  = Ar

g 50: 50;  Arg = 51: 51;  Arg 52: 52;  Arg 53: 53;  Arg 54: 54;  Arg 55: 55;  Arg 56: 56;  Arg 57: 57;  Arg = 58:

58;  Arg 59: = 59;  Arg 60: 60;  Arg 61: 61;  Arg 62: 62;  Arg 63: 63;  = Arg 64: 64;  Arg 65: 65;  Arg 66: 66;  = A

rg 67: 67;  = Arg 68: 68;  Arg 69: 69;  Arg 70: 70;  Arg 71: 71;  Arg 72: 72;  Arg 73: 73;  Arg 74: 74;  Arg = 75:

 75;  Arg = 76: 76;  Arg 77: 77;  Arg 78: 78;  Arg 79: 79;  Arg 80: 80;  Arg 81: 81;  Arg 82: 82;  Arg 83: = 83;

Arg 84: 84;  = Arg 85: 85;  Arg 86: 86;  Arg 87: 87;  Arg 88: 88;  Arg 89: 89;  Arg 90: 90;  Arg 91: 91;  Arg = 92

: 92;  Arg 93: 93;  Arg 94: 94;  Arg 95: 95;  Arg 96: 96;  Arg 97: 97;  Arg 98: 98;  Arg 99: 99;  Arg 100: = 100

;  Arg 101: = 101;  Arg 102: 102;  Arg 103: 103;  Arg 104: 104;  Arg 105: = 105;  Arg 106: 106;  Arg 107: 107;  Ar

g 108: 108;  = Arg 109: 109;  Arg 110: 110;  Arg 111: 111;  Arg 112: 112;  = Arg 113: 113;  Arg 114: 114;  Arg 115

: 115;  Arg = 116: 116;  Arg 117: 117;  Arg 118: 118;  Arg 119: 119;  = Arg 120: 120;  Arg 121: 121;  Arg 122: 122

;  Arg 123: = 123;  Arg 124: 124;  Arg 125: 125;  Arg 126: 126;  Arg 127: = 127;  Arg 128: 128;  Arg 129: 129;  Ar

g 130: 130;  = Arg 131: 131;  Arg 132: 132;  Arg 133: 133;  Arg 134: 134;  = Arg 135: 135;  Arg 136: 136;  Arg 137

: 137;  Arg = 138: 138;  Arg 139: 139;  Arg 140: 140;  Arg 141: 141;  = Arg 142: 142;  Arg 143: 143;  Arg 144: 144

;  Arg 145: = 145;  Arg 146: 146;  Arg 147: 147;  Arg 148: 148;  Arg 149: = 149;  Arg 150: 150;  Arg 151: 151;  Ar

g 152: 152;  = Arg 153: 153;  Arg 154: 154;  Arg 155: 155;  Arg 156: = 156;

$ set = noverify

G>

G>

G> @test_args = 170

$ prog  1 2 3 = 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 = 33 34 35 36 37

38 39 40 41 42 43 = 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 = 71 72 73 74

 75 76 77 78 = 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 = 104 105 106 107 10

8 109 110 111 112 = 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 = 133 134 135

136 137 138 139 140 = 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 = 161 162 16

3 164 165 166 167 = 168 169 170

  Arg 0: = $1$dka100:[XXXX]test_args.exe;4;  Arg 1: D;  Arg 2: ;  Arg = 3:

        &n= bsp;           &nb= sp;           &nbs= p;            = ;            =             &= nbsp;           &n= bsp;     D;  Arg 4: ;  Arg 5: D;

  Arg 6: ;  Arg 7: D;  Arg 8: ;  Arg 9: D;  Arg 13: = ;  Arg 14: ;  Arg 15: D

;  Arg 16:  D;  Arg 17: ;  Arg 18: ;  Arg 19: D;  Arg = 20: =B0D;  Arg 21: ;  Arg 22: ;  Arg 23: D;  Arg 24: = =BCD;

Arg 25: ;  Arg 26: ;  Arg 27: D;  Arg 28: =C8D;  Arg 29: = ;  Arg 30: ;  Arg 31: D;  Arg 32: =D4D;  Arg 33: ;  Arg = 3

4: = ;  Arg 35: D;  Arg 36: =E0D;  Arg 37: ;  Arg 38: ;  Arg = 39: D;  Arg 40: 40;  Arg 41: 41;  Arg 42: 42;  Arg = 43

: 43;  Arg 44: 44;  Arg 45: 45;  Arg 46: 46;  Arg 47: 47;  Arg 48: 48;  Arg 49: 49;  Arg 50: 50;  Arg 51: = 51;

 Arg 52: = 52;  Arg 53: 53;  Arg 54: 54;  Arg 55: 55;  Arg 56: 56;  Arg = 57: 57;  Arg 58: 58;  Arg 59: 59;  Arg = 6

0: 60;  Arg = 61: 61;  Arg 62: 62;  Arg 63: 63;  Arg 64: 64;  Arg 65: 65;  Arg 66: 66;  Arg 67: 67;  Arg 68: = 68;

  Arg 69: = 69;  Arg 70: 70;  Arg 71: 71;  Arg 72: 72;  Arg 73: 73;  Arg = 74: 74;  Arg 75: 75;  Arg 76: 76;  = Arg

77: 77;  Arg = 78: 78;  Arg 79: 79;  Arg 80: 80;  Arg 81: 81;  Arg 82: 82;  Arg 83: 83;  Arg 84: 84;  Arg 85: = 85

;  Arg 86: = 86;  Arg 87: 87;  Arg 88: 88;  Arg 89: 89;  Arg 90: 90;  = Arg 91: 91;  Arg 92: 92;  Arg 93: 93;  = Arg

 94: 94;  = Arg 95: 95;  Arg 96: 96;  Arg 97: 97;  Arg 98: 98;  Arg 99: 99;  Arg 100: 100;  Arg 101: 101;  Arg = 1

02: 102;  Arg = 103: 103;  Arg 104: 104;  Arg 105: 105;  Arg 106: 106;  = Arg 107: 107;  Arg 108: 108;  Arg 109: 1

09;  Arg 110: 110;  Arg 111: 111;  Arg 112: 112;  Arg 113: 113;  = Arg 114: 114;  Arg 115: 115;  Arg 116: = 116;

Arg 117: 117;  = Arg 118: 118;  Arg 119: 119;  Arg 120: 120;  Arg 121: 121;  = Arg 122: 122;  Arg 123: 123;  Arg 1

24: 124;  Arg = 125: 125;  Arg 126: 126;  Arg 127: 127;  Arg 128: 128;  = Arg 129: 129;  Arg 130: 130;  Arg 131: 1

31;  Arg 132: 132;  Arg 133: 133;  Arg 134: 134;  Arg 135: 135;  = Arg 136: 136;  Arg 137: 137;  Arg 138: = 138;

Arg 139: 139;  = Arg 140: 140;  Arg 141: 141;  Arg 142: 142;  Arg 143: 143;  = Arg 144: 144;  Arg 145: 145;  Arg 1

46: 146;  Arg = 147: 147;  Arg 148: 148;  Arg 149: 149;  Arg 150: 150;  = Arg 151: 151;  Arg 152: 152;  Arg 153: 1

53;  Arg 154: 154;  Arg 155: 155;  Arg 156: 156;  Arg 157: 157;  = Arg 158: 158;  Arg 159: 159;  Arg 160: = 160;

Arg 161: 161;  = Arg 162: 162;  Arg 163: 163;  Arg 164: 164;  Arg 165: 165;  = Arg 166: 166;  Arg 167: 167;  Arg 1

68: 168;  Arg = 169: 169;  Arg 170: 170;

$ set = noverify

G>

G>

------_=_NextPart_001_01C835E8.A549C173-- ------------------------------ Date: Mon, 03 Dec 2007 15:37:17 -0500 From: sol gongola Subject: Re: FW: Passing large number of arguments to a program Message-ID: <2OZ4j.235$Id1.109@newsfe10.lga> I am still on vms 7.2-1. vms 8.3 allows more than p1...p8? Farrell, Michael wrote: > One of my programmers wrote a program that receives a huge > (embarassingly huge) number of arguments. > > The program is run through a DCL jacket procedure that develops the > arguments and calls the program. > > > > If the number of arguments exceeds 143, not the leading argument, but > the following leading arguments get clobbered. > > (When 144 arguments are used, arguments 2 and 3 get clobbered.) > > > > The program below is a stub program that shows this condition. There > are 4 runs shown here. One for 143 arguments where all is fine, and one > each for 144, 156, and 170 arguments where an increasing number of the > leading arguments starting with argument 1 gets clobbered. (Note that > if you run this you can always see that “varg[0]” is correct, always > showing the exact version of the program name being executed.) > > > > Yes, passing a ridiculous number of arguments does bring new meaning to > the expression “quick and dirty programming”. And yes, there is a > better way to do it, and yes, that change is being made now. > > > > But, what went on here? Is DCL involved in this problem? Can someone > explain what could be involved? > > > > We are running “HP C V7.1-015 on OpenVMS Alpha V8.3”. The original > program was linked with a “STACK=200” command in the link options file > but I’m not sure if this. > > > > Any insight will be greatly appreciated. > > > > Thanks > > > > Mike > > > > Mike Farrell > > VoltDelta Resources, LLC > > > > > > G> cc test_args.c ! Std “cc” command > > G> link test_args ! Std “link” command > > > > > > Directory $1$DKA100:[XXXX] > > > > TEST_ARGS.C;4 0.50KB/34KB > 3-DEC-2007 10:59:41.99 > > TEST_ARGS.COM;3 1KB/34KB > 3-DEC-2007 11:11:17.58 > > TEST_ARGS.EXE;4 3KB/34KB > 3-DEC-2007 10:59:45.10 > > TEST_ARGS.OBJ;4 2KB/34KB > 3-DEC-2007 10:59:43.69 > > > > Total of 4 files, 7KB/138KB > > G> > > > > > > > > > > G> ty TEST_ARGS.COM > > $! TEST_ARGS.COM > > $! ------------- > > $! P1 - number of command line arguments to test > > $! > > $! This test procedure will generate requested number of command line > arguments as "1 2 3 ..", and > > $! will attempt to run TEST_ARGS.EXE program while passing all those > arguments. The program will attempt > > $! to simply print the list of command line arguments. > > $! > > $ if (f$type(P1) .nes. "INTEGER") then exit 4 > > $! > > $ n = 0 > > $ args = "" > > $ max = P1 > > $LOOP: > > $ n = n + 1 > > $ if (n .gt. max) then goto FINISH > > $ args = args + " ''n'" > > $ goto LOOP > > $FINISH: > > $! > > $ prog := $ $1$DKA100:[IGOR.SPB2ASC.REL_058]TEST_ARGS.EXE > > $ set verify > > $ prog 'args' > > $ set noverify > > $ exit > > G> > > > > > > > > G> type TEST_ARGS.c > > #include > > > > main(int narg, char *varg[]) { > > > > int n; > > > > for (n = 0; n < narg; n++) printf(" Arg %d: %s;", n, varg[n]); > > } > > G> > > > > > > > > > > G> @test_args *143* > > $ prog 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 > 25 26 27 28 29 30 31 32 33 34 35 36 37 > > 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 > 62 63 64 65 66 67 68 69 70 71 72 73 74 > > 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 > 99 100 101 102 103 104 105 106 107 10 > > 8 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 > 126 127 128 129 130 131 132 133 134 135 > > 136 137 138 139 140 141 142 143 > > Arg 0: $1$dka100:[XXXX]test_args.exe;4; Arg 1: 1; Arg 2: 2; Arg 3: > 3; Arg 4: 4; Arg 5: > > 5; Arg 6: 6; Arg 7: 7; Arg 8: 8; Arg 9: 9; Arg 10: 10; Arg 11: > 11; Arg 12: 12; Arg 13: 13; Arg 14: 14 > > ; Arg 15: 15; Arg 16: 16; Arg 17: 17; Arg 18: 18; Arg 19: 19; Arg > 20: 20; Arg 21: 21; Arg 22: 22; Arg > > 23: 23; Arg 24: 24; Arg 25: 25; Arg 26: 26; Arg 27: 27; Arg 28: > 28; Arg 29: 29; Arg 30: 30; Arg 31: 3 > > 1; Arg 32: 32; Arg 33: 33; Arg 34: 34; Arg 35: 35; Arg 36: 36; Arg > 37: 37; Arg 38: 38; Arg 39: 39; Ar > > g 40: 40; Arg 41: 41; Arg 42: 42; Arg 43: 43; Arg 44: 44; Arg 45: > 45; Arg 46: 46; Arg 47: 47; Arg 48: > > 48; Arg 49: 49; Arg 50: 50; Arg 51: 51; Arg 52: 52; Arg 53: 53; > Arg 54: 54; Arg 55: 55; Arg 56: 56; A > > rg 57: 57; Arg 58: 58; Arg 59: 59; Arg 60: 60; Arg 61: 61; Arg 62: > 62; Arg 63: 63; Arg 64: 64; Arg 65: > > 65; Arg 66: 66; Arg 67: 67; Arg 68: 68; Arg 69: 69; Arg 70: 70; > Arg 71: 71; Arg 72: 72; Arg 73: 73; > > Arg 74: 74; Arg 75: 75; Arg 76: 76; Arg 77: 77; Arg 78: 78; Arg 79: > 79; Arg 80: 80; Arg 81: 81; Arg 82 > > : 82; Arg 83: 83; Arg 84: 84; Arg 85: 85; Arg 86: 86; Arg 87: 87; > Arg 88: 88; Arg 89: 89; Arg 90: 90; > > Arg 91: 91; Arg 92: 92; Arg 93: 93; Arg 94: 94; Arg 95: 95; Arg > 96: 96; Arg 97: 97; Arg 98: 98; Arg 9 > > 9: 99; Arg 100: 100; Arg 101: 101; Arg 102: 102; Arg 103: 103; Arg > 104: 104; Arg 105: 105; Arg 106: 106 > > ; Arg 107: 107; Arg 108: 108; Arg 109: 109; Arg 110: 110; Arg 111: > 111; Arg 112: 112; Arg 113: 113; Ar > > g 114: 114; Arg 115: 115; Arg 116: 116; Arg 117: 117; Arg 118: 118; > Arg 119: 119; Arg 120: 120; Arg 121 > > : 121; Arg 122: 122; Arg 123: 123; Arg 124: 124; Arg 125: 125; Arg > 126: 126; Arg 127: 127; Arg 128: 128 > > ; Arg 129: 129; Arg 130: 130; Arg 131: 131; Arg 132: 132; Arg 133: > 133; Arg 134: 134; Arg 135: 135; Ar > > g 136: 136; Arg 137: 137; Arg 138: 138; Arg 139: 139; Arg 140: 140; > Arg 141: 141; Arg 142: 142; Arg 143 > > : 143; > > $ set noverify > > G> > > G> > > G> @test_args *144* > > $ prog 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 > 25 26 27 28 29 30 31 32 33 34 35 36 37 > > 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 > 62 63 64 65 66 67 68 69 70 71 72 73 74 > > 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 > 99 100 101 102 103 104 105 106 107 10 > > 8 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 > 126 127 128 129 130 131 132 133 134 135 > > 136 137 138 139 140 141 142 143 144 > > Arg 0: $1$dka100:[XXXX]test_args.exe;4; *Arg 1: D; Arg 2: ;* Arg 3: > 3; Arg 4: 4; Arg 5: 5 > > ; Arg 6: 6; Arg 7: 7; Arg 8: 8; Arg 9: 9; Arg 10: 10; Arg 11: 11; > Arg 12: 12; Arg 13: 13; Arg 14: 14; > > Arg 15: 15; Arg 16: 16; Arg 17: 17; Arg 18: 18; Arg 19: 19; Arg > 20: 20; Arg 21: 21; Arg 22: 22; Arg > > 23: 23; Arg 24: 24; Arg 25: 25; Arg 26: 26; Arg 27: 27; Arg 28: > 28; Arg 29: 29; Arg 30: 30; Arg 31: 31 > > ; Arg 32: 32; Arg 33: 33; Arg 34: 34; Arg 35: 35; Arg 36: 36; Arg > 37: 37; Arg 38: 38; Arg 39: 39; Arg > > 40: 40; Arg 41: 41; Arg 42: 42; Arg 43: 43; Arg 44: 44; Arg 45: > 45; Arg 46: 46; Arg 47: 47; Arg 48: 4 > > 8; Arg 49: 49; Arg 50: 50; Arg 51: 51; Arg 52: 52; Arg 53: 53; Arg > 54: 54; Arg 55: 55; Arg 56: 56; Ar > > g 57: 57; Arg 58: 58; Arg 59: 59; Arg 60: 60; Arg 61: 61; Arg 62: > 62; Arg 63: 63; Arg 64: 64; Arg 65: > > 65; Arg 66: 66; Arg 67: 67; Arg 68: 68; Arg 69: 69; Arg 70: 70; > Arg 71: 71; Arg 72: 72; Arg 73: 73; A > > rg 74: 74; Arg 75: 75; Arg 76: 76; Arg 77: 77; Arg 78: 78; Arg 79: > 79; Arg 80: 80; Arg 81: 81; Arg 82: > > 82; Arg 83: 83; Arg 84: 84; Arg 85: 85; Arg 86: 86; Arg 87: 87; > Arg 88: 88; Arg 89: 89; Arg 90: 90; > > Arg 91: 91; Arg 92: 92; Arg 93: 93; Arg 94: 94; Arg 95: 95; Arg 96: > 96; Arg 97: 97; Arg 98: 98; Arg 99 > > : 99; Arg 100: 100; Arg 101: 101; Arg 102: 102; Arg 103: 103; Arg > 104: 104; Arg 105: 105; Arg 106: 106; > > Arg 107: 107; Arg 108: 108; Arg 109: 109; Arg 110: 110; Arg 111: > 111; Arg 112: 112; Arg 113: 113; Arg > > 114: 114; Arg 115: 115; Arg 116: 116; Arg 117: 117; Arg 118: 118; > Arg 119: 119; Arg 120: 120; Arg 121: > > 121; Arg 122: 122; Arg 123: 123; Arg 124: 124; Arg 125: 125; Arg > 126: 126; Arg 127: 127; Arg 128: 128; > > Arg 129: 129; Arg 130: 130; Arg 131: 131; Arg 132: 132; Arg 133: > 133; Arg 134: 134; Arg 135: 135; Arg > > 136: 136; Arg 137: 137; Arg 138: 138; Arg 139: 139; Arg 140: 140; > Arg 141: 141; Arg 142: 142; Arg 143: > > 143; Arg 144: 144; > > $ set noverify > > G> > > G> > > G> @test_args *156* > > $ prog 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 > 25 26 27 28 29 30 31 32 33 34 35 36 37 > > 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 > 62 63 64 65 66 67 68 69 70 71 72 73 74 > > 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 > 99 100 101 102 103 104 105 106 107 10 > > 8 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 > 126 127 128 129 130 131 132 133 134 135 > > 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 > 154 155 156 > > Arg 0: $1$dka100:[XXXX]test_args.exe;4; *Arg 1: D; Arg 2: ; Arg 3:* > > * > D; Arg 4: ; Arg 5: D;* > > * Arg 6: ; Arg 7: D; Arg 8: ; Arg 9: D; Arg 13: ; Arg 14: ; Arg > 15: D* > > *; Arg 16: D; Arg 17: ; Arg 18: ; Arg 19: D; Arg 20: °D; Arg 21: > ;* Arg 22: 22; Arg 23: 23; Arg 24: 24 > > ; Arg 25: 25; Arg 26: 26; Arg 27: 27; Arg 28: 28; Arg 29: 29; Arg > 30: 30; Arg 31: 31; Arg 32: 32; Arg > > 33: 33; Arg 34: 34; Arg 35: 35; Arg 36: 36; Arg 37: 37; Arg 38: > 38; Arg 39: 39; Arg 40: 40; Arg 41: 4 > > 1; Arg 42: 42; Arg 43: 43; Arg 44: 44; Arg 45: 45; Arg 46: 46; Arg > 47: 47; Arg 48: 48; Arg 49: 49; Ar > > g 50: 50; Arg 51: 51; Arg 52: 52; Arg 53: 53; Arg 54: 54; Arg 55: > 55; Arg 56: 56; Arg 57: 57; Arg 58: > > 58; Arg 59: 59; Arg 60: 60; Arg 61: 61; Arg 62: 62; Arg 63: 63; > Arg 64: 64; Arg 65: 65; Arg 66: 66; A > > rg 67: 67; Arg 68: 68; Arg 69: 69; Arg 70: 70; Arg 71: 71; Arg 72: > 72; Arg 73: 73; Arg 74: 74; Arg 75: > > 75; Arg 76: 76; Arg 77: 77; Arg 78: 78; Arg 79: 79; Arg 80: 80; > Arg 81: 81; Arg 82: 82; Arg 83: 83; > > Arg 84: 84; Arg 85: 85; Arg 86: 86; Arg 87: 87; Arg 88: 88; Arg 89: > 89; Arg 90: 90; Arg 91: 91; Arg 92 > > : 92; Arg 93: 93; Arg 94: 94; Arg 95: 95; Arg 96: 96; Arg 97: 97; > Arg 98: 98; Arg 99: 99; Arg 100: 100 > > ; Arg 101: 101; Arg 102: 102; Arg 103: 103; Arg 104: 104; Arg 105: > 105; Arg 106: 106; Arg 107: 107; Ar > > g 108: 108; Arg 109: 109; Arg 110: 110; Arg 111: 111; Arg 112: 112; > Arg 113: 113; Arg 114: 114; Arg 115 > > : 115; Arg 116: 116; Arg 117: 117; Arg 118: 118; Arg 119: 119; Arg > 120: 120; Arg 121: 121; Arg 122: 122 > > ; Arg 123: 123; Arg 124: 124; Arg 125: 125; Arg 126: 126; Arg 127: > 127; Arg 128: 128; Arg 129: 129; Ar > > g 130: 130; Arg 131: 131; Arg 132: 132; Arg 133: 133; Arg 134: 134; > Arg 135: 135; Arg 136: 136; Arg 137 > > : 137; Arg 138: 138; Arg 139: 139; Arg 140: 140; Arg 141: 141; Arg > 142: 142; Arg 143: 143; Arg 144: 144 > > ; Arg 145: 145; Arg 146: 146; Arg 147: 147; Arg 148: 148; Arg 149: > 149; Arg 150: 150; Arg 151: 151; Ar > > g 152: 152; Arg 153: 153; Arg 154: 154; Arg 155: 155; Arg 156: 156; > > $ set noverify > > G> > > G> > > G> @test_args *170* > > $ prog 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 > 25 26 27 28 29 30 31 32 33 34 35 36 37 > > 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 > 62 63 64 65 66 67 68 69 70 71 72 73 74 > > 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 > 99 100 101 102 103 104 105 106 107 10 > > 8 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 > 126 127 128 129 130 131 132 133 134 135 > > 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 > 154 155 156 157 158 159 160 161 162 16 > > 3 164 165 166 167 168 169 170 > > Arg 0: $1$dka100:[XXXX]test_args.exe;4; *Arg 1: D; Arg 2: ; Arg 3:* > > * > D; Arg 4: ; Arg 5: D;* > > * Arg 6: ; Arg 7: D; Arg 8: ; Arg 9: D; Arg 13: ; Arg 14: ; Arg > 15: D* > > *; Arg 16: D; Arg 17: ; Arg 18: ; Arg 19: D; Arg 20: °D; Arg 21: > ; Arg 22: ; Arg 23: D; Arg 24: źD;* > > *Arg 25: ; Arg 26: ; Arg 27: D; Arg 28: ČD; Arg 29: ; Arg 30: ; > Arg 31: D; Arg 32: ÔD; Arg 33: ; Arg 3* > > *4: ; Arg 35: D; Arg 36: ŕD; Arg 37: ; Arg 38: ; Arg 39: D;* Arg > 40: 40; Arg 41: 41; Arg 42: 42; Arg 43 > > : 43; Arg 44: 44; Arg 45: 45; Arg 46: 46; Arg 47: 47; Arg 48: 48; > Arg 49: 49; Arg 50: 50; Arg 51: 51; > > Arg 52: 52; Arg 53: 53; Arg 54: 54; Arg 55: 55; Arg 56: 56; Arg > 57: 57; Arg 58: 58; Arg 59: 59; Arg 6 > > 0: 60; Arg 61: 61; Arg 62: 62; Arg 63: 63; Arg 64: 64; Arg 65: 65; > Arg 66: 66; Arg 67: 67; Arg 68: 68; > > Arg 69: 69; Arg 70: 70; Arg 71: 71; Arg 72: 72; Arg 73: 73; Arg > 74: 74; Arg 75: 75; Arg 76: 76; Arg > > 77: 77; Arg 78: 78; Arg 79: 79; Arg 80: 80; Arg 81: 81; Arg 82: > 82; Arg 83: 83; Arg 84: 84; Arg 85: 85 > > ; Arg 86: 86; Arg 87: 87; Arg 88: 88; Arg 89: 89; Arg 90: 90; Arg > 91: 91; Arg 92: 92; Arg 93: 93; Arg > > 94: 94; Arg 95: 95; Arg 96: 96; Arg 97: 97; Arg 98: 98; Arg 99: > 99; Arg 100: 100; Arg 101: 101; Arg 1 > > 02: 102; Arg 103: 103; Arg 104: 104; Arg 105: 105; Arg 106: 106; > Arg 107: 107; Arg 108: 108; Arg 109: 1 > > 09; Arg 110: 110; Arg 111: 111; Arg 112: 112; Arg 113: 113; Arg > 114: 114; Arg 115: 115; Arg 116: 116; > > Arg 117: 117; Arg 118: 118; Arg 119: 119; Arg 120: 120; Arg 121: > 121; Arg 122: 122; Arg 123: 123; Arg 1 > > 24: 124; Arg 125: 125; Arg 126: 126; Arg 127: 127; Arg 128: 128; > Arg 129: 129; Arg 130: 130; Arg 131: 1 > > 31; Arg 132: 132; Arg 133: 133; Arg 134: 134; Arg 135: 135; Arg > 136: 136; Arg 137: 137; Arg 138: 138; > > Arg 139: 139; Arg 140: 140; Arg 141: 141; Arg 142: 142; Arg 143: > 143; Arg 144: 144; Arg 145: 145; Arg 1 > > 46: 146; Arg 147: 147; Arg 148: 148; Arg 149: 149; Arg 150: 150; > Arg 151: 151; Arg 152: 152; Arg 153: 1 > > 53; Arg 154: 154; Arg 155: 155; Arg 156: 156; Arg 157: 157; Arg > 158: 158; Arg 159: 159; Arg 160: 160; > > Arg 161: 161; Arg 162: 162; Arg 163: 163; Arg 164: 164; Arg 165: > 165; Arg 166: 166; Arg 167: 167; Arg 1 > > 68: 168; Arg 169: 169; Arg 170: 170; > > $ set noverify > > G> > > G> > ------------------------------ Date: 03 Dec 2007 20:20:27 GMT From: Ken Robinson Subject: Re: FW: Passing large number of arguments to a program Message-ID: <4754650b$0$7446$88260bb3@news.teranews.com> sol gongola wrote in news:2OZ4j.235$Id1.109@newsfe10.lga: > I am still on vms 7.2-1. > vms 8.3 allows more than p1...p8? DCL only allows 8 arguments, the OP is passing the arguments to a C program. What the OP is probably running into is the maximum lenght of a DCL line, Ken ------------------------------ Date: Mon, 03 Dec 2007 20:51:08 GMT From: VAXman- @SendSpamHere.ORG Subject: Re: FW: Passing large number of arguments to a program Message-ID: <0%Z4j.83$g26.12@newsfe08.lga> In article <4754650b$0$7446$88260bb3@news.teranews.com>, Ken Robinson writes: > > >sol gongola wrote in >news:2OZ4j.235$Id1.109@newsfe10.lga: > >> I am still on vms 7.2-1. >> vms 8.3 allows more than p1...p8? > >DCL only allows 8 arguments, the OP is passing the arguments to a C >program. What the OP is probably running into is the maximum lenght of a >DCL line, The OP didn't bother to post his code in plain text making it virtually impossible for me to bother to decipher it. 2000+ lines of unreadable code. -- VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)COM "Well my son, life is like a beanstalk, isn't it?" http://tmesis.com/drat.html ------------------------------ Date: Mon, 3 Dec 2007 15:53:04 -0500 From: "Farrell, Michael" Subject: RE: FW: Passing large number of arguments to a program Message-ID: <8330CD39B64C934DBE63CB6D4CEE37D0382D44@NJ103EX2.EAST.VIS.COM> No, The program is called from inside the DCL jacket as a "foreign command". = That way, the arg list is supposed to be controlled by the program as = far as I know. See the statement: $ prog :=3D $$1$DKA100:[IGOR.SPB2ASC.REL_058]TEST_ARGS.EXE Then: $ prog 'args' Mike -----Original Message----- From: sol gongola [mailto:sol@adldata.com]=20 Sent: Monday, December 03, 2007 3:37 PM To: Info-VAX@Mvb.Saic.Com Subject: Re: FW: Passing large number of arguments to a program I am still on vms 7.2-1. vms 8.3 allows more than p1...p8? Farrell, Michael wrote: > One of my programmers wrote a program that receives a huge > (embarassingly huge) number of arguments.=20 >=20 > The program is run through a DCL jacket procedure that develops the > arguments and calls the program.=20 >=20 > =20 >=20 > If the number of arguments exceeds 143, not the leading argument, but > the following leading arguments get clobbered. >=20 > (When 144 arguments are used, arguments 2 and 3 get clobbered.) >=20 > =20 >=20 > The program below is a stub program that shows this condition. There > are 4 runs shown here. One for 143 arguments where all is fine, and = one > each for 144, 156, and 170 arguments where an increasing number of the > leading arguments starting with argument 1 gets clobbered. (Note that > if you run this you can always see that "varg[0]" is correct, always > showing the exact version of the program name being executed.) >=20 > =20 >=20 > Yes, passing a ridiculous number of arguments does bring new meaning = to > the expression "quick and dirty programming". And yes, there is a > better way to do it, and yes, that change is being made now. >=20 > =20 >=20 > But, what went on here? Is DCL involved in this problem? Can someone > explain what could be involved? >=20 > =20 >=20 > We are running "HP C V7.1-015 on OpenVMS Alpha V8.3". The original > program was linked with a "STACK=3D200" command in the link options = file > but I'm not sure if this. =20 >=20 > =20 >=20 > Any insight will be greatly appreciated. >=20 > =20 >=20 > Thanks >=20 > =20 >=20 > Mike >=20 > =20 >=20 > Mike Farrell >=20 > VoltDelta Resources, LLC >=20 > =20 >=20 > =20 >=20 > G> cc test_args.c ! Std "cc" command >=20 > G> link test_args ! Std "link" command >=20 > =20 >=20 > =20 >=20 > Directory $1$DKA100:[XXXX] >=20 > =20 >=20 > TEST_ARGS.C;4 0.50KB/34KB =20 > 3-DEC-2007 10:59:41.99 >=20 > TEST_ARGS.COM;3 1KB/34KB =20 > 3-DEC-2007 11:11:17.58 >=20 > TEST_ARGS.EXE;4 3KB/34KB =20 > 3-DEC-2007 10:59:45.10 >=20 > TEST_ARGS.OBJ;4 2KB/34KB =20 > 3-DEC-2007 10:59:43.69 >=20 > =20 >=20 > Total of 4 files, 7KB/138KB >=20 > G> >=20 > =20 >=20 > =20 >=20 > =20 >=20 > =20 >=20 > G> ty TEST_ARGS.COM >=20 > $! TEST_ARGS.COM >=20 > $! ------------- >=20 > $! P1 - number of command line arguments to test >=20 > $! >=20 > $! This test procedure will generate requested number of command line > arguments as "1 2 3 ..", and >=20 > $! will attempt to run TEST_ARGS.EXE program while passing all those > arguments. The program will attempt >=20 > $! to simply print the list of command line arguments. >=20 > $! >=20 > $ if (f$type(P1) .nes. "INTEGER") then exit 4 >=20 > $! >=20 > $ n =3D 0 >=20 > $ args =3D "" >=20 > $ max =3D P1 >=20 > $LOOP: >=20 > $ n =3D n + 1 >=20 > $ if (n .gt. max) then goto FINISH >=20 > $ args =3D args + " ''n'" >=20 > $ goto LOOP >=20 > $FINISH: >=20 > $! >=20 > $ prog :=3D $ $1$DKA100:[IGOR.SPB2ASC.REL_058]TEST_ARGS.EXE >=20 > $ set verify >=20 > $ prog 'args' >=20 > $ set noverify >=20 > $ exit >=20 > G> >=20 > =20 >=20 > =20 >=20 > =20 >=20 > G> type TEST_ARGS.c >=20 > #include >=20 > =20 >=20 > main(int narg, char *varg[]) { >=20 > =20 >=20 > int n; >=20 > =20 >=20 > for (n =3D 0; n < narg; n++) printf(" Arg %d: %s;", n, varg[n]); >=20 > } >=20 > G> >=20 > =20 >=20 > =20 >=20 > =20 >=20 > =20 >=20 > G> @test_args *143* >=20 > $ prog 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 > 25 26 27 28 29 30 31 32 33 34 35 36 37 >=20 > 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 = 61 > 62 63 64 65 66 67 68 69 70 71 72 73 74 >=20 > 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 = 98 > 99 100 101 102 103 104 105 106 107 10 >=20 > 8 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 > 126 127 128 129 130 131 132 133 134 135 >=20 > 136 137 138 139 140 141 142 143 >=20 > Arg 0: $1$dka100:[XXXX]test_args.exe;4; Arg 1: 1; Arg 2: 2; Arg = 3: > 3; Arg 4: 4; Arg 5: >=20 > 5; Arg 6: 6; Arg 7: 7; Arg 8: 8; Arg 9: 9; Arg 10: 10; Arg 11: > 11; Arg 12: 12; Arg 13: 13; Arg 14: 14 >=20 > ; Arg 15: 15; Arg 16: 16; Arg 17: 17; Arg 18: 18; Arg 19: 19; = Arg > 20: 20; Arg 21: 21; Arg 22: 22; Arg >=20 > 23: 23; Arg 24: 24; Arg 25: 25; Arg 26: 26; Arg 27: 27; Arg 28: > 28; Arg 29: 29; Arg 30: 30; Arg 31: 3 >=20 > 1; Arg 32: 32; Arg 33: 33; Arg 34: 34; Arg 35: 35; Arg 36: 36; = Arg > 37: 37; Arg 38: 38; Arg 39: 39; Ar >=20 > g 40: 40; Arg 41: 41; Arg 42: 42; Arg 43: 43; Arg 44: 44; Arg 45: > 45; Arg 46: 46; Arg 47: 47; Arg 48: >=20 > 48; Arg 49: 49; Arg 50: 50; Arg 51: 51; Arg 52: 52; Arg 53: 53;=20 > Arg 54: 54; Arg 55: 55; Arg 56: 56; A >=20 > rg 57: 57; Arg 58: 58; Arg 59: 59; Arg 60: 60; Arg 61: 61; Arg = 62: > 62; Arg 63: 63; Arg 64: 64; Arg 65: >=20 > 65; Arg 66: 66; Arg 67: 67; Arg 68: 68; Arg 69: 69; Arg 70: 70;=20 > Arg 71: 71; Arg 72: 72; Arg 73: 73; >=20 > Arg 74: 74; Arg 75: 75; Arg 76: 76; Arg 77: 77; Arg 78: 78; Arg = 79: > 79; Arg 80: 80; Arg 81: 81; Arg 82 >=20 > : 82; Arg 83: 83; Arg 84: 84; Arg 85: 85; Arg 86: 86; Arg 87: 87; = > Arg 88: 88; Arg 89: 89; Arg 90: 90; >=20 > Arg 91: 91; Arg 92: 92; Arg 93: 93; Arg 94: 94; Arg 95: 95; Arg > 96: 96; Arg 97: 97; Arg 98: 98; Arg 9 >=20 > 9: 99; Arg 100: 100; Arg 101: 101; Arg 102: 102; Arg 103: 103; = Arg > 104: 104; Arg 105: 105; Arg 106: 106 >=20 > ; Arg 107: 107; Arg 108: 108; Arg 109: 109; Arg 110: 110; Arg = 111: > 111; Arg 112: 112; Arg 113: 113; Ar >=20 > g 114: 114; Arg 115: 115; Arg 116: 116; Arg 117: 117; Arg 118: = 118;=20 > Arg 119: 119; Arg 120: 120; Arg 121 >=20 > : 121; Arg 122: 122; Arg 123: 123; Arg 124: 124; Arg 125: 125; = Arg > 126: 126; Arg 127: 127; Arg 128: 128 >=20 > ; Arg 129: 129; Arg 130: 130; Arg 131: 131; Arg 132: 132; Arg = 133: > 133; Arg 134: 134; Arg 135: 135; Ar >=20 > g 136: 136; Arg 137: 137; Arg 138: 138; Arg 139: 139; Arg 140: = 140;=20 > Arg 141: 141; Arg 142: 142; Arg 143 >=20 > : 143; >=20 > $ set noverify >=20 > G> >=20 > G> >=20 > G> @test_args *144* >=20 > $ prog 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 > 25 26 27 28 29 30 31 32 33 34 35 36 37 >=20 > 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 = 61 > 62 63 64 65 66 67 68 69 70 71 72 73 74 >=20 > 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 = 98 > 99 100 101 102 103 104 105 106 107 10 >=20 > 8 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 > 126 127 128 129 130 131 132 133 134 135 >=20 > 136 137 138 139 140 141 142 143 144 >=20 > Arg 0: $1$dka100:[XXXX]test_args.exe;4; *Arg 1: D; Arg 2: ;* Arg = 3: > 3; Arg 4: 4; Arg 5: 5 >=20 > ; Arg 6: 6; Arg 7: 7; Arg 8: 8; Arg 9: 9; Arg 10: 10; Arg 11: = 11;=20 > Arg 12: 12; Arg 13: 13; Arg 14: 14; >=20 > Arg 15: 15; Arg 16: 16; Arg 17: 17; Arg 18: 18; Arg 19: 19; Arg > 20: 20; Arg 21: 21; Arg 22: 22; Arg >=20 > 23: 23; Arg 24: 24; Arg 25: 25; Arg 26: 26; Arg 27: 27; Arg 28: > 28; Arg 29: 29; Arg 30: 30; Arg 31: 31 >=20 > ; Arg 32: 32; Arg 33: 33; Arg 34: 34; Arg 35: 35; Arg 36: 36; = Arg > 37: 37; Arg 38: 38; Arg 39: 39; Arg >=20 > 40: 40; Arg 41: 41; Arg 42: 42; Arg 43: 43; Arg 44: 44; Arg 45: > 45; Arg 46: 46; Arg 47: 47; Arg 48: 4 >=20 > 8; Arg 49: 49; Arg 50: 50; Arg 51: 51; Arg 52: 52; Arg 53: 53; = Arg > 54: 54; Arg 55: 55; Arg 56: 56; Ar >=20 > g 57: 57; Arg 58: 58; Arg 59: 59; Arg 60: 60; Arg 61: 61; Arg 62: > 62; Arg 63: 63; Arg 64: 64; Arg 65: >=20 > 65; Arg 66: 66; Arg 67: 67; Arg 68: 68; Arg 69: 69; Arg 70: 70;=20 > Arg 71: 71; Arg 72: 72; Arg 73: 73; A >=20 > rg 74: 74; Arg 75: 75; Arg 76: 76; Arg 77: 77; Arg 78: 78; Arg = 79: > 79; Arg 80: 80; Arg 81: 81; Arg 82: >=20 > 82; Arg 83: 83; Arg 84: 84; Arg 85: 85; Arg 86: 86; Arg 87: 87;=20 > Arg 88: 88; Arg 89: 89; Arg 90: 90; >=20 > Arg 91: 91; Arg 92: 92; Arg 93: 93; Arg 94: 94; Arg 95: 95; Arg = 96: > 96; Arg 97: 97; Arg 98: 98; Arg 99 >=20 > : 99; Arg 100: 100; Arg 101: 101; Arg 102: 102; Arg 103: 103; Arg > 104: 104; Arg 105: 105; Arg 106: 106; >=20 > Arg 107: 107; Arg 108: 108; Arg 109: 109; Arg 110: 110; Arg 111: > 111; Arg 112: 112; Arg 113: 113; Arg >=20 > 114: 114; Arg 115: 115; Arg 116: 116; Arg 117: 117; Arg 118: 118; = > Arg 119: 119; Arg 120: 120; Arg 121: >=20 > 121; Arg 122: 122; Arg 123: 123; Arg 124: 124; Arg 125: 125; Arg > 126: 126; Arg 127: 127; Arg 128: 128; >=20 > Arg 129: 129; Arg 130: 130; Arg 131: 131; Arg 132: 132; Arg 133: > 133; Arg 134: 134; Arg 135: 135; Arg >=20 > 136: 136; Arg 137: 137; Arg 138: 138; Arg 139: 139; Arg 140: 140; = > Arg 141: 141; Arg 142: 142; Arg 143: >=20 > 143; Arg 144: 144; >=20 > $ set noverify >=20 > G> >=20 > G> >=20 > G> @test_args *156* >=20 > $ prog 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 > 25 26 27 28 29 30 31 32 33 34 35 36 37 >=20 > 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 = 61 > 62 63 64 65 66 67 68 69 70 71 72 73 74 >=20 > 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 = 98 > 99 100 101 102 103 104 105 106 107 10 >=20 > 8 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 > 126 127 128 129 130 131 132 133 134 135 >=20 > 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 = 153 > 154 155 156 >=20 > Arg 0: $1$dka100:[XXXX]test_args.exe;4; *Arg 1: D; Arg 2: ; Arg = 3:* >=20 > * = =20 > D; Arg 4: ; Arg 5: D;* >=20 > * Arg 6: ; Arg 7: D; Arg 8: ; Arg 9: D; Arg 13: ; Arg 14: ; Arg > 15: D* >=20 > *; Arg 16: D; Arg 17: ; Arg 18: ; Arg 19: D; Arg 20: =B0D; Arg = 21: > ;* Arg 22: 22; Arg 23: 23; Arg 24: 24 >=20 > ; Arg 25: 25; Arg 26: 26; Arg 27: 27; Arg 28: 28; Arg 29: 29; = Arg > 30: 30; Arg 31: 31; Arg 32: 32; Arg >=20 > 33: 33; Arg 34: 34; Arg 35: 35; Arg 36: 36; Arg 37: 37; Arg 38: > 38; Arg 39: 39; Arg 40: 40; Arg 41: 4 >=20 > 1; Arg 42: 42; Arg 43: 43; Arg 44: 44; Arg 45: 45; Arg 46: 46; = Arg > 47: 47; Arg 48: 48; Arg 49: 49; Ar >=20 > g 50: 50; Arg 51: 51; Arg 52: 52; Arg 53: 53; Arg 54: 54; Arg 55: > 55; Arg 56: 56; Arg 57: 57; Arg 58: >=20 > 58; Arg 59: 59; Arg 60: 60; Arg 61: 61; Arg 62: 62; Arg 63: 63;=20 > Arg 64: 64; Arg 65: 65; Arg 66: 66; A >=20 > rg 67: 67; Arg 68: 68; Arg 69: 69; Arg 70: 70; Arg 71: 71; Arg = 72: > 72; Arg 73: 73; Arg 74: 74; Arg 75: >=20 > 75; Arg 76: 76; Arg 77: 77; Arg 78: 78; Arg 79: 79; Arg 80: 80;=20 > Arg 81: 81; Arg 82: 82; Arg 83: 83; >=20 > Arg 84: 84; Arg 85: 85; Arg 86: 86; Arg 87: 87; Arg 88: 88; Arg = 89: > 89; Arg 90: 90; Arg 91: 91; Arg 92 >=20 > : 92; Arg 93: 93; Arg 94: 94; Arg 95: 95; Arg 96: 96; Arg 97: 97; = > Arg 98: 98; Arg 99: 99; Arg 100: 100 >=20 > ; Arg 101: 101; Arg 102: 102; Arg 103: 103; Arg 104: 104; Arg = 105: > 105; Arg 106: 106; Arg 107: 107; Ar >=20 > g 108: 108; Arg 109: 109; Arg 110: 110; Arg 111: 111; Arg 112: = 112;=20 > Arg 113: 113; Arg 114: 114; Arg 115 >=20 > : 115; Arg 116: 116; Arg 117: 117; Arg 118: 118; Arg 119: 119; = Arg > 120: 120; Arg 121: 121; Arg 122: 122 >=20 > ; Arg 123: 123; Arg 124: 124; Arg 125: 125; Arg 126: 126; Arg = 127: > 127; Arg 128: 128; Arg 129: 129; Ar >=20 > g 130: 130; Arg 131: 131; Arg 132: 132; Arg 133: 133; Arg 134: = 134;=20 > Arg 135: 135; Arg 136: 136; Arg 137 >=20 > : 137; Arg 138: 138; Arg 139: 139; Arg 140: 140; Arg 141: 141; = Arg > 142: 142; Arg 143: 143; Arg 144: 144 >=20 > ; Arg 145: 145; Arg 146: 146; Arg 147: 147; Arg 148: 148; Arg = 149: > 149; Arg 150: 150; Arg 151: 151; Ar >=20 > g 152: 152; Arg 153: 153; Arg 154: 154; Arg 155: 155; Arg 156: = 156; >=20 > $ set noverify >=20 > G> >=20 > G> >=20 > G> @test_args *170* >=20 > $ prog 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 > 25 26 27 28 29 30 31 32 33 34 35 36 37 >=20 > 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 = 61 > 62 63 64 65 66 67 68 69 70 71 72 73 74 >=20 > 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 = 98 > 99 100 101 102 103 104 105 106 107 10 >=20 > 8 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 > 126 127 128 129 130 131 132 133 134 135 >=20 > 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 = 153 > 154 155 156 157 158 159 160 161 162 16 >=20 > 3 164 165 166 167 168 169 170 >=20 > Arg 0: $1$dka100:[XXXX]test_args.exe;4; *Arg 1: D; Arg 2: ; Arg = 3:* >=20 > * = =20 > D; Arg 4: ; Arg 5: D;* >=20 > * Arg 6: ; Arg 7: D; Arg 8: ; Arg 9: D; Arg 13: ; Arg 14: ; Arg > 15: D* >=20 > *; Arg 16: D; Arg 17: ; Arg 18: ; Arg 19: D; Arg 20: =B0D; Arg = 21: > ; Arg 22: ; Arg 23: D; Arg 24: =BCD;* >=20 > *Arg 25: ; Arg 26: ; Arg 27: D; Arg 28: =C8D; Arg 29: ; Arg 30: ; = > Arg 31: D; Arg 32: =D4D; Arg 33: ; Arg 3* >=20 > *4: ; Arg 35: D; Arg 36: =E0D; Arg 37: ; Arg 38: ; Arg 39: D;* = Arg > 40: 40; Arg 41: 41; Arg 42: 42; Arg 43 >=20 > : 43; Arg 44: 44; Arg 45: 45; Arg 46: 46; Arg 47: 47; Arg 48: 48; = > Arg 49: 49; Arg 50: 50; Arg 51: 51; >=20 > Arg 52: 52; Arg 53: 53; Arg 54: 54; Arg 55: 55; Arg 56: 56; Arg > 57: 57; Arg 58: 58; Arg 59: 59; Arg 6 >=20 > 0: 60; Arg 61: 61; Arg 62: 62; Arg 63: 63; Arg 64: 64; Arg 65: = 65;=20 > Arg 66: 66; Arg 67: 67; Arg 68: 68; >=20 > Arg 69: 69; Arg 70: 70; Arg 71: 71; Arg 72: 72; Arg 73: 73; Arg > 74: 74; Arg 75: 75; Arg 76: 76; Arg >=20 > 77: 77; Arg 78: 78; Arg 79: 79; Arg 80: 80; Arg 81: 81; Arg 82: > 82; Arg 83: 83; Arg 84: 84; Arg 85: 85 >=20 > ; Arg 86: 86; Arg 87: 87; Arg 88: 88; Arg 89: 89; Arg 90: 90; = Arg > 91: 91; Arg 92: 92; Arg 93: 93; Arg >=20 > 94: 94; Arg 95: 95; Arg 96: 96; Arg 97: 97; Arg 98: 98; Arg 99: > 99; Arg 100: 100; Arg 101: 101; Arg 1 >=20 > 02: 102; Arg 103: 103; Arg 104: 104; Arg 105: 105; Arg 106: 106;=20 > Arg 107: 107; Arg 108: 108; Arg 109: 1 >=20 > 09; Arg 110: 110; Arg 111: 111; Arg 112: 112; Arg 113: 113; Arg > 114: 114; Arg 115: 115; Arg 116: 116; >=20 > Arg 117: 117; Arg 118: 118; Arg 119: 119; Arg 120: 120; Arg 121: > 121; Arg 122: 122; Arg 123: 123; Arg 1 >=20 > 24: 124; Arg 125: 125; Arg 126: 126; Arg 127: 127; Arg 128: 128;=20 > Arg 129: 129; Arg 130: 130; Arg 131: 1 >=20 > 31; Arg 132: 132; Arg 133: 133; Arg 134: 134; Arg 135: 135; Arg > 136: 136; Arg 137: 137; Arg 138: 138; >=20 > Arg 139: 139; Arg 140: 140; Arg 141: 141; Arg 142: 142; Arg 143: > 143; Arg 144: 144; Arg 145: 145; Arg 1 >=20 > 46: 146; Arg 147: 147; Arg 148: 148; Arg 149: 149; Arg 150: 150;=20 > Arg 151: 151; Arg 152: 152; Arg 153: 1 >=20 > 53; Arg 154: 154; Arg 155: 155; Arg 156: 156; Arg 157: 157; Arg > 158: 158; Arg 159: 159; Arg 160: 160; >=20 > Arg 161: 161; Arg 162: 162; Arg 163: 163; Arg 164: 164; Arg 165: > 165; Arg 166: 166; Arg 167: 167; Arg 1 >=20 > 68: 168; Arg 169: 169; Arg 170: 170; >=20 > $ set noverify >=20 > G> >=20 > G> >=20 ------------------------------ Date: Mon, 3 Dec 2007 16:04:35 -0500 From: "Farrell, Michael" Subject: RE: FW: Passing large number of arguments to a program Message-ID: <8330CD39B64C934DBE63CB6D4CEE37D0382D48@NJ103EX2.EAST.VIS.COM> If it is running into the maximum length of a DCL line, then why is it that varg[1], varg[2], etc., is clobbered but the last arguments (args 144, 156, and 170 in each of the examples is good? Remember that varg[0] (the program name) is also good. Secondly, in reading the DCL Dictionary on the section concerning = ":=3D", it says that the maximum offset to a DCL string cannot exceed 768. These strings at their worst size do not exceed 720 in the production program. In the examples I have shown, they are significantly shorter than that. Mike -----Original Message----- From: Ken Robinson [mailto:sendspamhere@example.com]=20 Sent: Monday, December 03, 2007 3:20 PM To: Info-VAX@Mvb.Saic.Com Subject: Re: FW: Passing large number of arguments to a program sol gongola wrote in news:2OZ4j.235$Id1.109@newsfe10.lga:=20 > I am still on vms 7.2-1. > vms 8.3 allows more than p1...p8? DCL only allows 8 arguments, the OP is passing the arguments to a C=20 program. What the OP is probably running into is the maximum lenght of a DCL line, Ken ------------------------------ Date: Mon, 3 Dec 2007 16:38:47 -0500 From: "Farrell, Michael" Subject: RE: FW: Passing large number of arguments to a program Message-ID: <8330CD39B64C934DBE63CB6D4CEE37D0382D54@NJ103EX2.EAST.VIS.COM> Sorry about that, Hopefully this will be better. If not let me know. Thanks, Mike=20 ________________________________________ From: Farrell, Michael=20 Sent: Monday, December 03, 2007 3:11 PM To: 'Info-VAX@Mvb.Saic.Com' Subject: FW: Passing large number of arguments to a program One of my programmers wrote a program that receives a huge = (embarassingly huge) number of arguments. The program is run through a = DCL jacket procedure that develops the arguments and calls the program. = If the number of arguments exceeds 143, not the leading argument, = (varg[0]) ,but the following leading arguments get clobbered. (When 144 arguments are used, arguments 1 and 2 get clobbered.) The program below is a stub program that shows this condition. There = are 4 runs shown here. One for 143 arguments where all is fine, and one = each for 144, 156, and 170 arguments where an increasing number of the = leading arguments starting with argument 1 gets clobbered. (Note that = if you run this you can always see that "varg[0]" is correct, always = showing the exact version of the program name being executed.) Yes, passing a ridiculous number of arguments does bring new meaning to = the expression "quick and dirty programming". And yes, there is a = better way to do it, and yes, that change is being made now. But, what went on here? Is DCL involved in this problem? Can someone = explain what could be involved? We are running "HP C V7.1-015 on OpenVMS Alpha V8.3". The original = program was linked with a "STACK=3D200" command in the link options file = but I'm not sure if this. =20 Any insight will be greatly appreciated. Thanks Mike Mike Farrell VoltDelta Resources, LLC G> cc test_args.c ! Std "cc" command G> link test_args ! Std "link" command Directory $1$DKA100:[XXXX] =20 TEST_ARGS.C;4 0.50KB/34KB = 3-DEC-2007 10:59:41.99 TEST_ARGS.COM;3 1KB/34KB = 3-DEC-2007 11:11:17.58 TEST_ARGS.EXE;4 3KB/34KB = 3-DEC-2007 10:59:45.10 TEST_ARGS.OBJ;4 2KB/34KB = 3-DEC-2007 10:59:43.69 =20 Total of 4 files, 7KB/138KB G> G> ty TEST_ARGS.COM $! TEST_ARGS.COM $! ------------- $! P1 - number of command line arguments to test $! $! This test procedure will generate requested number of command line = arguments as "1 2 3 ...", and $! will attempt to run TEST_ARGS.EXE program while passing all those = arguments. The program will attempt $! to simply print the list of command line arguments. $! $ if (f$type(P1) .nes. "INTEGER") then exit 4 $! $ n =3D 0 $ args =3D "" $ max =3D P1 $LOOP: $ n =3D n + 1 $ if (n .gt. max) then goto FINISH $ args =3D args + " ''n'" $ goto LOOP $FINISH: $! $ prog :=3D $ $1$DKA100:[IGOR.SPB2ASC.REL_058]TEST_ARGS.EXE $ set verify $ prog 'args' $ set noverify $ exit G> G> type TEST_ARGS.c #include =20 main(int narg, char *varg[]) { int n; for (n =3D 0; n < narg; n++) printf(" Arg %d: %s;", n, varg[n]); } G> G> @test_args 143 $ prog 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 = 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 = 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 = 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 = 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 = 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 = 135 136 137 138 139 140 141 142 143 Arg 0: $1$dka100:[XXXX]test_args.exe;4; Arg 1: 1; Arg 2: 2; Arg 3: = 3; Arg 4: 4; Arg 5: 5; Arg 6: 6; Arg 7: 7; Arg 8: 8; Arg 9: 9; =20 Arg 10: 10; Arg 11: 11; Arg 12: 12; Arg 13: 13; Arg 14: 14; Arg 15: = 15; Arg 16: 16; Arg 17: 17; Arg 18: 18; Arg 19: 19; Arg 20: 20; = Arg 21: 21; Arg 22: 22; Arg 23: 23; Arg 24: 24; Arg 25: 25; Arg 26: = 26; Arg 27: 27; Arg 28: 28; Arg 29: 29; Arg 30: 30; Arg 31: 31; = Arg 32: 32; Arg 33: 33; Arg 34: 34; Arg 35: 35; Arg 36: 36; Arg 37: = 37; Arg 38: 38; Arg 39: 39; Arg 40: 40; Arg 41: 41; Arg 42: 42; = Arg 43: 43; Arg 44: 44; Arg 45: 45; Arg 46: 46; Arg 47: 47; Arg 48: = 48; Arg 49: 49; Arg 50: 50; Arg 51: 51; Arg 52: 52; Arg 53: 53; = Arg 54: 54; Arg 55: 55; Arg 56: 56; Arg 57: 57; Arg 58: 58; Arg 59: = 59; Arg 60: 60; Arg 61: 61; Arg 62: 62; Arg 63: 63; Arg 64: 64; = Arg 65: 65; Arg 66: 66; Arg 67: 67; Arg 68: 68; Arg 69: 69; Arg 70: = 70; Arg 71: 71; Arg 72: 72; Arg 73: 73; Arg 74: 74; Arg 75: 75; = Arg 76: 76; Arg 77: 77; Arg 78: 78; Arg 79: 79; Arg 80: 80; Arg 81: = 81; Arg 82: 82; Arg 83: 83; Arg 84: 84; Arg 85: 85; Arg 86: 86; = Arg 87: 87; Arg 88: 88; Arg 89: 89; Arg 90: 90; Arg 91: 91; Arg 92: = 92; Arg 93: 93; Arg 94: 94; Arg 95: 95; Arg 96: 96; Arg 97: 97; = Arg 98: 98; Arg 99: 99; Arg 100: 100; Arg 101: 101; Arg 102: 102; = Arg 103: 103; Arg 104: 104; Arg 105: 105; Arg 106: 106; Arg 107: = 107; Arg 108: 108; Arg 109: 109; Arg 110: 110; Arg 111: 111; Arg = 112: 112; Arg 113: 113; Arg 114: 114; Arg 115: 115; Arg 116: 116; = Arg 117: 117; Arg 118: 118; Arg 119: 119; Arg 120: 120; Arg 121: = 121; Arg 122: 122; Arg 123: 123; Arg 124: 124; Arg 125: 125; Arg = 126: 126; Arg 127: 127; Arg 128: 128; Arg 129: 129; Arg 130: 130; = Arg 131: 131; Arg 132: 132; Arg 133: 133; Arg 134: 134; Arg 135: = 135; Arg 136: 136; Arg 137: 137; Arg 138: 138; Arg 139: 139; Arg = 140: 140; Arg 141: 141; Arg 142: 142; Arg 143: 143; $ set noverify G> G> G> @test_args 144 $ prog 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 = 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 = 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 = 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 = 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 = 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 = 134 135 136 137 138 139 140 141 142 143 144 Arg 0: $1$dka100:[XXXX]test_args.exe;4; Arg 1: D; Arg 2: ; Arg 3: = 3; Arg 4: 4; Arg 5: 5; Arg 6: 6; Arg 7: 7; Arg 8: 8; Arg 9: 9; =20 Arg 10: 10; Arg 11: 11; Arg 12: 12; Arg 13: 13; Arg 14: 14; Arg 15: = 15; Arg 16: 16; Arg 17: 17; Arg 18: 18; Arg 19: 19; Arg 20: 20; = Arg 21: 21; Arg 22: 22; Arg 23: 23; Arg 24: 24; Arg 25: 25; Arg 26: = 26; Arg 27: 27; Arg 28: 28; Arg 29: 29; Arg 30: 30; Arg 31: 31; = Arg 32: 32; Arg 33: 33; Arg 34: 34; Arg 35: 35; Arg 36: 36; Arg 37: = 37; Arg 38: 38; Arg 39: 39; Arg 40: 40; Arg 41: 41; Arg 42: 42; = Arg 43: 43; Arg 44: 44; Arg 45: 45; Arg 46: 46; Arg 47: 47; Arg 48: = 48; Arg 49: 49; Arg 50: 50; Arg 51: 51; Arg 52: 52; Arg 53: 53; = Arg 54: 54; Arg 55: 55; Arg 56: 56; Arg 57: 57; Arg 58: 58; Arg 59: = 59; Arg 60: 60; Arg 61: 61; Arg 62: 62; Arg 63: 63; Arg 64: 64; = Arg 65: 65; Arg 66: 66; Arg 67: 67; Arg 68: 68; Arg 69: 69; Arg 70: = 70; Arg 71: 71; Arg 72: 72; Arg 73: 73; Arg 74: 74; Arg 75: 75; = Arg 76: 76; Arg 77: 77; Arg 78: 78; Arg 79: 79; Arg 80: 80; Arg 81: = 81; Arg 82: 82; Arg 83: 83; Arg 84: 84; Arg 85: 85; Arg 86: 86; = Arg 87: 87; Arg 88: 88; Arg 89: 89; Arg 90: 90; Arg 91: 91; Arg 92: = 92; Arg 93: 93; Arg 94: 94; Arg 95: 95; Arg 96: 96; Arg 97: 97; = Arg 98: 98; Arg 99: 99; Arg 100: 100; Arg 101: 101; Arg 102: 102; = Arg 103: 103; Arg 104: 104; Arg 105: 105; Arg 106: 106; Arg 107: = 107; Arg 108: 108; Arg 109: 109; Arg 110: 110; Arg 111: 111; Arg = 112: 112; Arg 113: 113; Arg 114: 114; Arg 115: 115; Arg 116: 116; = Arg 117: 117; Arg 118: 118; Arg 119: 119; Arg 120: 120; Arg 121: = 121; Arg 122: 122; Arg 123: 123; Arg 124: 124; Arg 125: 125; Arg = 126: 126; Arg 127: 127; Arg 128: 128; Arg 129: 129; Arg 130: 130; = Arg 131: 131; Arg 132: 132; Arg 133: 133; Arg 134: 134; Arg 135: = 135; Arg 136: 136; Arg 137: 137; Arg 138: 138; Arg 139: 139; Arg = 140: 140; Arg 141: 141; Arg 142: 142; Arg 143: 143; Arg 144: 144; $ set noverify G> G> G> @test_args 156 $ prog 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 = 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 = 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 = 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 = 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 = 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 = 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 = 152 153 154 155 156=20 Arg 0: $1$dka100:[XXXX]test_args.exe;4; Arg 1: D; Arg 2: ; Arg 3: = D; Arg 4: ; Arg 5: D; Arg 6: ; Arg 7: D; Arg 8: ; Arg 9: D; Arg = 13: ; Arg 14: ; Arg 15: D; Arg 16: D; Arg 17: ; Arg 18: ; Arg 19: D; =20 Arg 20: =B0D; Arg 21: ; Arg 22: 22; Arg 23: 23; Arg 24: 24; Arg 25: = 25; Arg 26: 26; Arg 27: 27; Arg 28: 28; Arg 29: 29; Arg 30: 30; = Arg 31: 31; Arg 32: 32; Arg 33: 33; Arg 34: 34; Arg 35: 35; Arg 36: = 36; Arg 37: 37; Arg 38: 38; Arg 39: 39; Arg 40: 40; Arg 41: 41; = Arg 42: 42; Arg 43: 43; Arg 44: 44; Arg 45: 45; Arg 46: 46; Arg 47: = 47; Arg 48: 48; Arg 49: 49; Arg 50: 50; Arg 51: 51; Arg 52: 52; = Arg 53: 53; Arg 54: 54; Arg 55: 55; Arg 56: 56; Arg 57: 57; Arg 58: = 58; Arg 59: 59; Arg 60: 60; Arg 61: 61; Arg 62: 62; Arg 63: 63; = Arg 64: 64; Arg 65: 65; Arg 66: 66; Arg 67: 67; Arg 68: 68; Arg 69: = 69; Arg 70: 70; Arg 71: 71; Arg 72: 72; Arg 73: 73; Arg 74: 74; = Arg 75: 75; Arg 76: 76; Arg 77: 77; Arg 78: 78; Arg 79: 79; Arg 80: = 80; Arg 81: 81; Arg 82: 82; Arg 83: 83; Arg 84: 84; Arg 85: 85; = Arg 86: 86; Arg 87: 87; Arg 88: 88; Arg 89: 89; Arg 90: 90; Arg 91: = 91; Arg 92: 92; Arg 93: 93; Arg 94: 94; Arg 95: 95; Arg 96: 96; = Arg 97: 97; Arg 98: 98; Arg 99: 99; Arg 100: 100; Arg 101: 101; Arg = 102: 102; =20 Arg 103: 103; Arg 104: 104; Arg 105: 105; Arg 106: 106; Arg 107: = 107; Arg 108: 108; Arg 109: 109; Arg 110: 110; Arg 111: 111; Arg = 112: 112; Arg 113: 113; Arg 114: 114; Arg 115: 115; Arg 116: 116; = Arg 117: 117; Arg 118: 118; Arg 119: 119; Arg 120: 120; Arg 121: = 121; Arg 122: 122; Arg 123: 123; Arg 124: 124; Arg 125: 125; Arg = 126: 126; Arg 127: 127; Arg 128: 128; Arg 129: 129; Arg 130: 130; = Arg 131: 131; Arg 132: 132; Arg 133: 133; Arg 134: 134; Arg 135: = 135; Arg 136: 136; Arg 137: 137; Arg 138: 138; Arg 139: 139; Arg = 140: 140; Arg 141: 141; Arg 142: 142; Arg 143: 143; Arg 144: 144; = Arg 145: 145; Arg 146: 146; Arg 147: 147; Arg 148: 148; Arg 149: = 149; Arg 150: 150; Arg 151: 151; Arg 152: 152; Arg 153: 153; Arg = 154: 154; Arg 155: 155; Arg 156: 156; $ set noverify G> G> G> @test_args 170 $ prog 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 = 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 = 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 = 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 = 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 = 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 = 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 = 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 = 170 Arg 0: $1$dka100:[XXXX]test_args.exe;4; Arg 1: D; Arg 2: ; Arg 3: = D; Arg 4: ; Arg 5: D; Arg 6: ; Arg 7: D; Arg 8: ; Arg 9: D; Arg = 13: ; Arg 14: ; Arg 15: D; Arg 16: D; Arg 17: ; Arg 18: ; Arg 19: = D; =20 Arg 20: =B0D; Arg 21: ; Arg 22: ; Arg 23: D; Arg 24: =BCD; Arg 25: ; = =20 Arg 26: ; Arg 27: D; Arg 28: =C8D; Arg 29: ; Arg 30: ; Arg 31: D; = Arg 32: =D4D; Arg 33: ; Arg 34: ; Arg 35: D; Arg 36: =E0D; Arg 37: = ; Arg 38: ; Arg 39: D; Arg 40: 40; Arg 41: 41; Arg 42: 42; Arg 43: = 43; Arg 44: 44; Arg 45: 45; Arg 46: 46; Arg 47: 47; Arg 48: 48; = Arg 49: 49; Arg 50: 50; Arg 51: 51; Arg 52: 52; Arg 53: 53; Arg 54: = 54; Arg 55: 55; Arg 56: 56; Arg 57: 57; Arg 58: 58; Arg 59: 59; = Arg 60: 60; Arg 61: 61; Arg 62: 62; Arg 63: 63; Arg 64: 64; Arg 65: = 65; Arg 66: 66; Arg 67: 67; Arg 68: 68; Arg 69: 69; Arg 70: 70; Arg 71: 71; Arg 72: 72; Arg 73: 73; =20 Arg 74: 74; Arg 75: 75; Arg 76: 76; Arg 77: 77; Arg 78: 78; Arg 79: = 79; Arg 80: 80; Arg 81: 81; Arg 82: 82; Arg 83: 83; Arg 84: 84; = Arg 85: 85; Arg 86: 86; Arg 87: 87; Arg 88: 88; Arg 89: 89; Arg 90: = 90; Arg 91: 91; Arg 92: 92; Arg 93: 93; Arg 94: 94; Arg 95: 95; = Arg 96: 96; Arg 97: 97; Arg 98: 98; Arg 99: 99; Arg 100: 100; Arg = 101: 101; Arg 102: 102; =20 Arg 103: 103; Arg 104: 104; Arg 105: 105; Arg 106: 106; Arg 107: = 107; Arg 108: 108; Arg 109: 109; Arg 110: 110; Arg 111: 111; Arg = 112: 112; Arg 113: 113; Arg 114: 114; Arg 115: 115; Arg 116: 116; = Arg 117: 117; Arg 118: 118; Arg 119: 119; Arg 120: 120; Arg 121: = 121; Arg 122: 122; Arg 123: 123; Arg 124: 124; Arg 125: 125; Arg = 126: 126; Arg 127: 127; Arg 128: 128; Arg 129: 129; Arg 130: 130; = Arg 131: 131; Arg 132: 132; Arg 133: 133; Arg 134: 134; Arg 135: = 135; Arg 136: 136; Arg 137: 137; Arg 138: 138; Arg 139: 139; Arg = 140: 140; Arg 141: 141; Arg 142: 142; Arg 143: 143; Arg 144: 144; = Arg 145: 145; Arg 146: 146; Arg 147: 147; Arg 148: 148; Arg 149: = 149; Arg 150: 150; Arg 151: 151; Arg 152: 152; Arg 153: 153; Arg = 154: 154; Arg 155: 155; Arg 156: 156; Arg 157: 157; Arg 158: 158; = Arg 159: 159; Arg 160: 160; Arg 161: 161; Arg 162: 162; Arg 163: = 163; Arg 164: 164; Arg 165: 165; Arg 166: 166; Arg 167: 167; Arg = 168: 168; Arg 169: 169; Arg 170: 170; $ set noverify G> G> -----Original Message----- From: VAXman- @SendSpamHere.ORG [mailto:VAXman- @SendSpamHere.ORG]=20 Sent: Monday, December 03, 2007 3:51 PM To: Info-VAX@Mvb.Saic.Com Subject: Re: FW: Passing large number of arguments to a program In article <4754650b$0$7446$88260bb3@news.teranews.com>, Ken Robinson = writes: > > >sol gongola wrote in >news:2OZ4j.235$Id1.109@newsfe10.lga:=20 > >> I am still on vms 7.2-1. >> vms 8.3 allows more than p1...p8? > >DCL only allows 8 arguments, the OP is passing the arguments to a C=20 >program. What the OP is probably running into is the maximum lenght of = a=20 >DCL line, The OP didn't bother to post his code in plain text making it virtually=20 impossible for me to bother to decipher it. 2000+ lines of unreadable code. --=20 VAXman- A Bored Certified VMS Kernel Mode Hacker = VAXman(at)TMESIS(dot)COM =20 "Well my son, life is like a beanstalk, isn't it?"=20 http://tmesis.com/drat.html ------------------------------ Date: Mon, 03 Dec 2007 13:41:32 -0800 From: Fred Bach Subject: Re: FW: Passing large number of arguments to a program Message-ID: Ken Robinson wrote: > sol gongola wrote in > news:2OZ4j.235$Id1.109@newsfe10.lga: > >> I am still on vms 7.2-1. >> vms 8.3 allows more than p1...p8? > > DCL only allows 8 arguments, the OP is passing the arguments to a C > program. What the OP is probably running into is the maximum lenght of a > DCL line, > > Ken Ken, You can get DCL itself to input a long line of arguments, and then get DCL to parse them itself, without using a C program. Just make DCL think it is inputting P1 as a quoted string of text. Then the limit of input is simply the length of the keyboard buffer. I found the trick of getting DCL to take long lines of dictation in my DIARY.com suite. I enter the symbol ADDD several times a day to make entries into my online work diary. I use a symbol to point to a DCL command procedure, but the symbol itself is defined as having a single trailing double-quote. SO my ADDDIARY.COM (below) grabs a line of text which can be several elements long (~254 chars max). Then by using the lexical function f$element you could dig out each argument just inputted on the command line. Here is may ADDD (short for ADDDIARY.COM). NOTE AGAIN: THE TRICK IS IN HOW YOU DEFINE THE SHORTHAND SYMBOL FOR THE PROGRAM!!! The symbol must be defined with a trailing double-quotation mark. > show symbol addd > ADDD*IARY == "@BACH$DIR:[COM]ADDDIARY.COM " " Here is how I define the symbol. ( DEFINE.COM runs inside LOGIN.COM ) > search define.com adddiary > $! 08-SEO-2000 FWB. Add ADDDIARY. Trailing triple quote allows lowercase and more than 8 args. > $ ADDD*IARY :==@BACH$DIR:[COM]ADDDIARY.COM """ This trialling quote is absolutely essential. Unfortunately, you do pay a price for this functionality. The entry must not contain single quotes. If you use a single quote, DCL will try to translate the word following it as a symbol. If you use a double-quote in your line of text, then the text following the double quote comes back in all capitals. First, an example of the single quote: > addd This isn't Fred's day. > LOGIN == "@SYS$LOGIN:LOGIN.COM" > LOGINTIME == "3-DEC-2007 07:36:16.47" > Taking data from command line. > Continue entry, end with BLANK line: > Continue entry, end with BLANK line: > DIARY_ENTRY: > > Monday 3-DEC-2007 13:19:27 This isn Fred@BACH$DIR:[COM]S.COM day. > Is this entry OK? {Yes}: Note the 't has no translation, and so isn't comes out as isn . Note that the 's in Fred's has a translation, and the value of the symbol "s" is placed in the line to be added to the diary. Next, the example with a pair of lone double-quotes and text in the middle: > ADDD Arrive 07:15 "Weather was poor". > LOGIN == "@SYS$LOGIN:LOGIN.COM" > LOGINTIME == "3-DEC-2007 07:36:23.03" > Taking data from command line. > Continue entry, end with BLANK line: > Continue entry, end with BLANK line: > DIARY_ENTRY: > > Monday 3-DEC-2007 13:16:47 Arrive 07:15 WEATHER WAS POOR". > Is this entry OK? {Yes}: Note that the phrase Weather was poor came out in all caps. I haven't experimented with various combinations of double and single quotes, but I figure that if you know the rules then you actually could add the text you wanted to the diary. Here is ADDDIARY.COM. Remember that it expects everything on the first line to be part of the FIRST argument since the symbol ends with a trailing lone double-quote. > Bach_1_BN2> type adddiary.com > $! written Friday 08-SEP-2000 by Fred W. Bach, TRIUMF Operations > $! tag keyboard diary entries and add to diary. > $! In DEFINE.COM the symbol ADDD*IARY is defined to have a trailing > $! single quote which allows many words and lowercase from argument string. > $! Pretty neat VMS DCL trick, eh ?? > $! edit 12-MAY-2004 FWB. Add empty line at beginning. > $! > $ ON WARNING THEN CONTINUE > $ ON ERROR THEN GOTO EXIT > $ ON SEVERE_ERROR THEN STOP > $ ON CONTROL_Y THEN GOTO EXIT > $ DOUBLESI*ZE = "@BACH$DIR:[COM]DOUBLESIZE.COM" > $ DOUBLESIZE_C*ENTER = "@BACH$DIR:[COM]DOUBLESIZE_CENTER.COM" > $ SPACE = " " > $ SPACES = " " > $ ARGS = "" > $ ARGS = p1+space+p2+space+p3+space+p4+space+p5+space+p6+space+p7+space+p8 > $ ARGS = F$EDIT(ARGS,"TRIM") !remove any leading or trailing spaces. > $ LINE = "" > $ PID = F$GETJPI("","PID") > $! > $!***** NOTE: DIARY directory MUST exist under SYS$LOGIN directory > $! > $ DIARY_DIR = F$TRNLNM("SYS$LOGIN") - "]" + ".DIARY]" > $ DIARY_FILE = DIARY_DIR + "DIARY.TXT" > $ DIARY_TEMP = DIARY_DIR + "DIARY.''PID'" > $ THIS_TIME = F$CVTIME("",,"WEEKDAY") + " " + F$TIME() > $! chop off the fractional seconds - wasted characters > $ THIS_TIME = F$EXTRACT(0,F$LENGTH(THIS_TIME)-3,THIS_TIME) > $! > $! **** create temporary file > $! > $ show symbol/global *login* > $ CLOSE/NOLOG OUTFILE > $ CREATE 'DIARY_TEMP' > $ OPEN/APPEND OUTFILE 'DIARY_TEMP' > $ WRITE OUTFILE " " !need an empty line to separate it from last day's entry > $! > $! **** Write date & time to temp file. > $! > $ IF F$EDIT(ARGS,"COLLAPSE") .EQS. "" THEN WRITE/SYMBOL OUTFILE THIS_TIME > $! SHOW SYMBOL THIS_TIME > $! > $! > $ line_count = 0 > $LOOP: > $ if f$edit(args,"collapse") .eqs. "" > $ then > $! > $! *** if entry started on command line, then use Continue instead of Write > $! > $ WORD = "Write" > $ if line_count .ne. 0 then WORD = "Continue" > $ Doublesize "''word' entry, end with BLANK line:" > $ read/prompt="DIARY_ENTRY: " sys$command line > $ if line_count .lt. 1 .and. f$edit(line,"collapse") .eqs. "" then goto exit > $ line_count = line_count + 1 > $ if line_count .eq. 1 then LINE = SPACES + THIS_TIME + SPACE + LINE > $ else > $ write sys$output "Taking data from command line." > $ line = SPACES + THIS_TIME + SPACE + ARGS > $ line_count = line_count + 1 > $ args = "" !must kill args otherwise we will loop forever > $ endif > $ if f$edit(line,"collapse") .eqs. "" then goto GOT_ENTRY > $ write/symbol outfile line > $ line = "" > $ goto loop > $! > $GOT_ENTRY: > $ close outfile > $! > $EDIT_ENTRY: > $ TYPE 'diary_temp' > $ INQUIRE OK "Is this entry OK? {Yes}" > $ IF OK .EQS. "" THEN OK = "YES" > $ IF OK THEN GOTO APPEND_ENTRY > $ ASSIGN/USER SYS$COMMAND SYS$INPUT > $ EDIT = "EDIT/TPU/INIT=''diary_dir'DIARY$INIT.EVE/COMM=''diary_dir'DIARY$COMMAND.TPU" > $ EDIT 'DIARY_TEMP' > $ GOTO EDIT_ENTRY > $! > $APPEND_ENTRY: > $ on error then goto APPEND_ERROR > $ on warning then goto EXIT > $ append/log 'diary_temp' 'diary_file' > $ delete/nolog/noconfirm 'diary_temp';* > $ doublesize "Entry dated: ''this_time'" > $! > $EXIT: > $ close/nolog outfile > $ sho default > $ exit > $! > $APPEND_ERROR: > $ status = $STATUS > $ write sys$output "Error appending temp file: ''f$message(STATUS)'" > $ goto exit ------------------------------ Date: Mon, 03 Dec 2007 17:40:37 -0500 From: JF Mezei Subject: Re: FW: Passing large number of arguments to a program Message-ID: <90221$475485e6$cef8887a$24954@TEKSAVVY.COM> Suggestion: Instead of running your program, get the arguments into a single string and do a F$LENGTH of it. aka: chocolate:= "$myprogram.exe" instead of doing: $chocolate 1 2 3 4 5 ... 143 do $vanilla = "1 2 3 4 5 6 ... 143" $write sys$output "Length of argument list is "''f$length(vanilla)'" You could also include in that length the actual command. (either "chocolate" or "$myprogram.exe") ------------------------------ Date: Mon, 03 Dec 2007 22:47:48 GMT From: =?ISO-8859-1?Q?Jan-Erik_S=F6derholm?= Subject: Re: FW: Passing large number of arguments to a program Message-ID: Another (third ?) paramater passing method I often use (at least by COM files calling other COM files) is to pass the paramaters by logicals or symbols. No practical limitations. Jan-Erik. ------------------------------ Date: Mon, 03 Dec 2007 18:50:11 -0500 From: Stephen Hoffman Subject: Re: FW: Passing large number of arguments to a program Message-ID: Farrell, Michael wrote: > One of my programmers wrote a program that receives a huge > (embarassingly huge) number of arguments. > > The program is run through a DCL jacket procedure that develops the > arguments and calls the program. > > > If the number of arguments exceeds 143, not the leading argument, but > the following leading arguments get clobbered. From the documentation of DCL currently available in the OpenVMS User's Guide at the HP web site: "Include no more than 127 elements (parameters, qualifiers, and qualifier values) in each command line." The associated command length and token size limits were increased in late V7 and in V8 releases, and that much is documented in the new features manuals. I don't know that the maximum number of elements has been changed. (Based on what you are seeing, it would appear not.) If this documentation holds -- it's what is currently posted, though whether or not this documentation is the most current in light of the DCL changes is another question -- then your programmer's code is depending on unsupported behavior, and you have an enhancement request (better error reporting, more elements) and not a bug report. (How HP might choose to respond to any of this is another and open question.) Me? I'd alter the code to avoid needing a gazillion parameters. I'd tend to look to pass in the wad of data required here via a file or via mailbox or other such approach. (FWIW, DCL has mailbox capabilities in recent releases with CREATE /MAILBOX and such...) Or at least stuff the wad you have into 127 or fewer elements. -- www.HoffmanLabs.com Services for OpenVMS ------------------------------ Date: Mon, 03 Dec 2007 20:22:28 -0500 From: JF Mezei Subject: Re: FW: Passing large number of arguments to a program Message-ID: <3d639$4754abd6$cef8887a$1437@TEKSAVVY.COM> Stephen Hoffman wrote: > From the documentation of DCL currently available in the OpenVMS User's > Guide at the HP web site: "Include no more than 127 elements > (parameters, qualifiers, and qualifier values) in each command line." Is this applicable to a C program that does a unix-like grabbing of arguments via argc/argv ? I can understand this limitaion applying to real DCL (eg: application doing CLI$PARSE $GET_VALUE etc), but would DCL be involved in parsing any of the stuff after the command ? Or does the C run time just access a single long string beyond the command and parse it itself ? ------------------------------ Date: Mon, 03 Dec 2007 20:44:02 -0500 From: "Richard B. Gilbert" Subject: Re: FW: Passing large number of arguments to a program Message-ID: <4754B0E2.6060703@comcast.net> Stephen Hoffman wrote: > Farrell, Michael wrote: > >> One of my programmers wrote a program that receives a huge >> (embarassingly huge) number of arguments. >> The program is run through a DCL jacket procedure that develops the >> arguments and calls the program. >> >> If the number of arguments exceeds 143, not the leading argument, but >> the following leading arguments get clobbered. > > > Me? I'd alter the code to avoid needing a gazillion parameters. I'd > tend to look to pass in the wad of data required here via a file or via > mailbox or other such approach. (FWIW, DCL has mailbox capabilities in > recent releases with CREATE /MAILBOX and such...) Or at least stuff the > wad you have into 127 or fewer elements. > You are too kind! I'd fire the boob who wrote the program that required several hundred arguments! ------------------------------ Date: Mon, 03 Dec 2007 20:52:04 -0600 From: David J Dachtera Subject: Re: FW: Passing large number of arguments to a program Message-ID: <4754C0D4.612D54E@spam.comcast.net> "Farrell, Michael" wrote: > > Sorry about that, > > Hopefully this will be better. If not let me know. Not. Turn off MIME, and make sure to set your news program to post as plain text only only. > Thanks, > > Mike > > ________________________________________ > From: Farrell, Michael > Sent: Monday, December 03, 2007 3:11 PM > To: 'Info-VAX@Mvb.Saic.Com' > Subject: FW: Passing large number of arguments to a program > > One of my programmers wrote a program that receives a huge (embarassingly huge) number of arguments. The program is run through a DCL jacket procedure that develops the arguments and calls the program. > > If the number of arguments exceeds 143, not the leading argument, (varg[0]) ,but the following leading arguments get clobbered. > (When 144 arguments are used, arguments 1 and 2 get clobbered.) > > The program below is a stub program that shows this condition. There are 4 runs shown here. One for 143 arguments where all is fine, and one each for 144, 156, and 170 arguments where an increasing number of the leading arguments starting with argument 1 gets clobbered. (Note that if you run this you can always see that "varg[0]" is correct, always showing the exact version of the program name being executed.) > > Yes, passing a ridiculous number of arguments does bring new meaning to the expression "quick and dirty programming". And yes, there is a better way to do it, and yes, that change is being made now. > > But, what went on here? Is DCL involved in this problem? Can someone explain what could be involved? > > We are running "HP C V7.1-015 on OpenVMS Alpha V8.3". The original program was linked with a "STACK=200" command in the link options file but I'm not sure if this. (Long lines manually broken into readable form.) Have you tried: $ prog "''args'" ...? That may return a single argument of space-separated elements. Dunno if your code can handle that. Please consider redesigning the program to accept a more manageable argument list, or read them in from a file or some other approach. This may be a lot of work to discover that the original approach was a candidate for improvement. My $0.02... David J Dachtera DJE Systems ------------------------------ Date: Mon, 03 Dec 2007 19:11:39 -0500 From: Stephen Hoffman Subject: Re: Itanium / Integrity question Message-ID: Short answer: This mixture is a non-issue; Windows will find the disk signatures it expects, and should not stomp on the OpenVMS I64 bootstrap, save for cases where you repartition disks or write to partitions you don't own, etc. Long answer follows... JF Mezei wrote: > re: Microsoft putting its "signature" on every drive. > > Does EFI have an ability to hide hardware from an OS ? (eg: wrote some > parameters into EFI so that certain devices are not made available to > the OS booting from that EFI programme. This way, one could configure > EFI for windows to not see any real drives on the system, this way > Windows wouldn't try to touch them with its satanic signature. The message would involve mixing Microsoft Windows on Alpha or Microsoft Windows on Itanium, and another operating system that does not offer MBR or GPT disk structures. (We could discuss Windows on x86-32 and x86-64, but there is no native port of OpenVMS for those boxes, so that combination is not currently an issue.) If you're still using Windows on Alpha and you're swapping disks around or you're swapping operating systems, you are probably already aware of this. This signature does only affect the system disk or another bootable disk, and it's easily remedied -- once you know what happened -- with a WRITEBOOT command. The signature is confined to the boot block. Now as for Microsoft Windows on Itanium, disks initialized by OpenVMS on Integrity servers will have a low-level disk volume structure that is sufficiently recognized by Windows that Windows should not be seeking to write its headers onto the disk. Bootable disks hauled over to Itanium from Alpha or VAX -- those that lack a GPT.SYS and the underlying GPT structures -- that are booted by MBR-style bootstraps could still be vulnerable to this corruption, though a SET BOOTBLOCK (/MBR) will clear this case. (For various reasons, reinitializing a disk can be a good idea; there are recommendations along these lines in the existing documentation, IIRC.) With system and data disks that have been initialized by OpenVMS I64 (or initialized on Alpha with INITIALIZE /GPT) and that have the GPT.SYS file, the Windows disk detection and signature processing should not be triggered; the disks will have a GPT. Bootable disks that are not using GPT.SYS will have an MBR structure, which is what Microsoft Windows is looking for, so those too should not see issues with Microsoft Windows and its signature processing. Now as for EFI, EFI does not provide Galaxy capabilities. Part of the basis for Galaxy is that the console reports up only a subset of the available hardware to the operating system. The other part is that the operating system doesn't go looking to stomp on shared resources, or tossing out various reset operations. Conceivably, EFI could be modified to report a subset of disks. You'd have to ask HP if there are any plans in this area. When last I looked at the roadmap and the published materials, the plans were for compatibility with HPIVM for OpenVMS I64 V8.4. (HPIVM is the HP Integrity Virtual Machine environment that is based on HP-UX.) So the most likely issue with the "harmless signature" fun involves an Alpha system with Microsoft Windows NT Alpha or equivalent-vintage software mixed with a platform that does not use GPT or MBR or equivalent for its bootstrap structures. This is the case with OpenVMS Alpha, which uses the BTB structures for its bootstrap. Details of the boot path and the related bootstrap processing are in a document available /node/28 at the web site. -- www.HoffmanLabs.com Services for OpenVMS ------------------------------ Date: Mon, 03 Dec 2007 20:38:32 -0600 From: David J Dachtera Subject: Re: Itanium / Integrity question Message-ID: <4754BDA8.E7A21173@spam.comcast.net> "John E. Malmberg" wrote: > > David J Dachtera wrote: > > "John E. Malmberg" wrote: > >> Richard B. Gilbert wrote: > >>> Michael Unger wrote: > >>>> What about the problem of Windows writing a "harmless signature" to each > >>>> disk it is able to recognize? Is this still true for current versions? > >>> I'd forgotten about that little glitch. If Windows still behaves that > >>> way and, AFAIK Microsoft had no reason to fix it, then it would not be > >>> possible to include Windows in such a configuration. > >> The writing of the "harmless signature" has always been optional. > > > > How does one set the "option" to "Never write 'harmless' signature"? > > You do not respond with a yes to the prompt to write the "harmless > signature". Is that the EXACT text of the message? It's possible I've seen it, and not recognized it as such. ...and is it *ALWAYS* optional? David J Dachtera DJE Systems ------------------------------ Date: Mon, 3 Dec 2007 11:20:18 -0800 (PST) From: Ken.Fairfield@gmail.com Subject: MSL5000 Tape Library tape cleaning? Message-ID: <3f612cde-4bc3-421f-882d-a17f1674ad27@i12g2000prf.googlegroups.com> We have an MSL5000 Storageworks (SDLT) tape library: two SDLT320 tape drives and 24 tape capacity. (We also have two MSL6000 LTO tape libraries for which the same question will apply...) I haven't dealt with these libraries before. What I find is that the previous sysmgr (currently out on extended medical leave) has a cleaning tape loaded in the last slot of the tape "stacker". What I can see is any front-panel indication of whether a drive needs to be cleaned, and furthermore, if I do a $ ROBOT SHOW SLOT, the cleaning tape doesn't appear in the output, even though it has a "proper" "CLNxxx" barcode label on it. My question is two fold: 1) how do you know when a drive needs to be cleaned, and 2) how do you load a cleaning tape into a drive if the robot doesn't think there's anything in the slot? Related question: are these libraries so smart that they take care of the cleaning themselves??? At issue is that a backup failed over the weekend with a parity error followed by a fatal controller error (I'd have to go look at the logs to be more precise), and the drive in question has been accumulating more than its share of errors (seen from DCL with SHOW ERROR). I could be a bad tape, but I also wanted to try cleaning the drive. Thanks, Ken -- Ken & Ann Fairfield What: Ken dot And dot Ann Where: Gmail dot Com ------------------------------ Date: Mon, 03 Dec 2007 14:35:56 -0500 From: "Richard B. Gilbert" Subject: Re: MSL5000 Tape Library tape cleaning? Message-ID: <47545A9C.7080402@comcast.net> Ken.Fairfield@gmail.com wrote: > We have an MSL5000 Storageworks (SDLT) tape library: two SDLT320 > tape drives and 24 tape capacity. (We also have two MSL6000 LTO > tape libraries for which the same question will apply...) > > I haven't dealt with these libraries before. What I find is that > the previous sysmgr (currently out on extended medical leave) has > a cleaning tape loaded in the last slot of the tape "stacker". > What I can see is any front-panel indication of whether a drive > needs to be cleaned, and furthermore, if I do a $ ROBOT SHOW SLOT, > the cleaning tape doesn't appear in the output, even though it has > a "proper" "CLNxxx" barcode label on it. > > My question is two fold: 1) how do you know when a drive needs > to be cleaned, and 2) how do you load a cleaning tape into a > drive if the robot doesn't think there's anything in the slot? > > Related question: are these libraries so smart that they take > care of the cleaning themselves??? > > At issue is that a backup failed over the weekend with a parity > error followed by a fatal controller error (I'd have to go look > at the logs to be more precise), and the drive in question has > been accumulating more than its share of errors (seen from DCL > with SHOW ERROR). I could be a bad tape, but I also wanted to > try cleaning the drive. My experience with various DLT drives suggests cleaning them after every ten to fourteen tapes. YMMV. ------------------------------ Date: Mon, 3 Dec 2007 11:38:51 -0800 (PST) From: Ken.Fairfield@gmail.com Subject: Re: MSL5000 Tape Library tape cleaning? Message-ID: <3f128413-68e0-4938-ab92-a103c5d0a9ce@s8g2000prg.googlegroups.com> On Dec 3, 11:20 am, Ken.Fairfi...@gmail.com wrote: [...] > What I can see is any front-panel indication of whether a drive What I *can't* see is any front-panel indication ... > needs to be cleaned, and furthermore, if I do a $ ROBOT SHOW SLOT, > the cleaning tape doesn't appear in the output, even though it has > a "proper" "CLNxxx" barcode label on it. I will note that with the left stacker removed, I can see the drives inside the library, I can see green LEDs on the drives, and I don't see any amber "clean me" LEDs. Are there any? Thanks, Ken ------------------------------ Date: Mon, 3 Dec 2007 14:57:38 -0500 From: norm.raphael@metso.com Subject: Re: MSL5000 Tape Library tape cleaning? Message-ID: This is a multipart message in MIME format. --=_alternative 006DA565852573A6_= Content-Type: text/plain; charset="US-ASCII" I can put the library into maintenance mode and manually select cleaning. Do you know the password to access that menu from the front panel. Ken.Fairfield@gmail.com wrote on 12/03/2007 02:38:51 PM: > On Dec 3, 11:20 am, Ken.Fairfi...@gmail.com wrote: > [...] > > What I can see is any front-panel indication of whether a drive > > What I *can't* see is any front-panel indication ... > > > needs to be cleaned, and furthermore, if I do a $ ROBOT SHOW SLOT, > > the cleaning tape doesn't appear in the output, even though it has > > a "proper" "CLNxxx" barcode label on it. > > I will note that with the left stacker removed, I can see > the drives inside the library, I can see green LEDs on > the drives, and I don't see any amber "clean me" LEDs. > Are there any? > > Thanks, Ken > --=_alternative 006DA565852573A6_= Content-Type: text/html; charset="US-ASCII"

I can put the library into maintenance mode and manually select cleaning.

Do you know the password to access that menu from the front panel.

Ken.Fairfield@gmail.com wrote on 12/03/2007 02:38:51 PM:

> On Dec 3, 11:20 am, Ken.Fairfi...@gmail.com wrote:
> [...]
> > What I can see is any front-panel indication of whether a drive
>
> What I *can't* see is any front-panel indication ...
>
> > needs to be cleaned, and furthermore, if I do a $ ROBOT SHOW SLOT,
> > the cleaning tape doesn't appear in the output, even though it has
> > a "proper" "CLNxxx" barcode label on it.
>
> I will note that with the left stacker removed, I can see
> the drives inside the library, I can see green LEDs on
> the drives, and I don't see any amber "clean me" LEDs.
> Are there any?
>
>    Thanks, Ken
>
--=_alternative 006DA565852573A6_=-- ------------------------------ Date: Mon, 3 Dec 2007 15:14:59 -0500 From: "Jeff Goodwin" Subject: Re: MSL5000 Tape Library tape cleaning? Message-ID: <4754638c$0$8814$4c368faf@roadrunner.com> wrote in message news:3f612cde-4bc3-421f-882d-a17f1674ad27@i12g2000prf.googlegroups.com... > We have an MSL5000 Storageworks (SDLT) tape library: two SDLT320 > tape drives and 24 tape capacity. (We also have two MSL6000 LTO > tape libraries for which the same question will apply...) > > I haven't dealt with these libraries before. What I find is that > the previous sysmgr (currently out on extended medical leave) has > a cleaning tape loaded in the last slot of the tape "stacker". > What I can see is any front-panel indication of whether a drive > needs to be cleaned, and furthermore, if I do a $ ROBOT SHOW SLOT, > the cleaning tape doesn't appear in the output, even though it has > a "proper" "CLNxxx" barcode label on it. > > My question is two fold: 1) how do you know when a drive needs > to be cleaned, and 2) how do you load a cleaning tape into a > drive if the robot doesn't think there's anything in the slot? > The SDLT cleaning tape shows up on our MSL5000: $ robot show slot 36 SLOT: 36 CLN071 $ $ robot show robot Robot Name: $2$GGA0: Type: SCSI Media Robot Identifier: COMPAQ MSL5000 Series 0430 Slots: 50 Drives: 3 Inports: 2 Outports: 2 Transports: 1 $ I just manually load the tape via the ROBOT utility if I want to clean the drive. I've never seen a cleaning correct an issue in this jukebox. > Related question: are these libraries so smart that they take > care of the cleaning themselves??? > > At issue is that a backup failed over the weekend with a parity > error followed by a fatal controller error (I'd have to go look > at the logs to be more precise), and the drive in question has > been accumulating more than its share of errors (seen from DCL > with SHOW ERROR). I could be a bad tape, but I also wanted to > try cleaning the drive. We've gone through many tape drives over the last few years. About 10% of our tapes used to be bad right out of the box. > > Thanks, Ken > -- > Ken & Ann Fairfield > What: Ken dot And dot Ann > Where: Gmail dot Com ------------------------------ Date: Mon, 03 Dec 2007 22:53:07 +0200 From: =?ISO-8859-1?Q?Uusim=E4ki?= Subject: Re: MSL5000 Tape Library tape cleaning? Message-ID: <47546aa0$0$3527$9b536df3@news.fv.fi> Jeff Goodwin wrote: > wrote in message > news:3f612cde-4bc3-421f-882d-a17f1674ad27@i12g2000prf.googlegroups.com... >> We have an MSL5000 Storageworks (SDLT) tape library: two SDLT320 >> tape drives and 24 tape capacity. (We also have two MSL6000 LTO >> tape libraries for which the same question will apply...) >> >> I haven't dealt with these libraries before. What I find is that >> the previous sysmgr (currently out on extended medical leave) has >> a cleaning tape loaded in the last slot of the tape "stacker". >> What I can see is any front-panel indication of whether a drive >> needs to be cleaned, and furthermore, if I do a $ ROBOT SHOW SLOT, >> the cleaning tape doesn't appear in the output, even though it has >> a "proper" "CLNxxx" barcode label on it. >> >> My question is two fold: 1) how do you know when a drive needs >> to be cleaned, and 2) how do you load a cleaning tape into a >> drive if the robot doesn't think there's anything in the slot? >> > > The SDLT cleaning tape shows up on our MSL5000: > > $ robot show slot 36 > SLOT: 36 CLN071 > $ > $ robot show robot > > Robot Name: $2$GGA0: Type: SCSI > > Media Robot Identifier: COMPAQ MSL5000 Series 0430 > > Slots: 50 > Drives: 3 > Inports: 2 > Outports: 2 > Transports: 1 > $ > > > I just manually load the tape via the ROBOT utility if I want to clean the > drive. I've never seen a cleaning correct an issue in this jukebox. > >> Related question: are these libraries so smart that they take >> care of the cleaning themselves??? >> >> At issue is that a backup failed over the weekend with a parity >> error followed by a fatal controller error (I'd have to go look >> at the logs to be more precise), and the drive in question has >> been accumulating more than its share of errors (seen from DCL >> with SHOW ERROR). I could be a bad tape, but I also wanted to >> try cleaning the drive. > > We've gone through many tape drives over the last few years. About 10% of > our tapes used to be bad right out of the box. > >> Thanks, Ken >> -- >> Ken & Ann Fairfield >> What: Ken dot And dot Ann >> Where: Gmail dot Com > > The cleaning needed will be visible on the library front panel and also by the drive LEDs. Almost all modern tape libraries can be put into "self cleaning mode", which means that the library will take care of the tape drive cleaning automatically when needed - all by itself. The library will get the signal from the tape drive when cleaning is needed and the robotics will insert the cleaning tape into the correct drive and after the cleaning pass the robotics move the tape back to its slot. The library also keeps record of how many times the cleaning tape has been used and it will discard the tape when the defined amount of cleaning cycles has been used up. If you want to do the cleaning manually, you can do it using MRU (robot) or by tapping on the library front panel soft keys. In both cases you load the cleaning tape into the drive which needs cleaning and then wait for the cleaning cycle to be done and then load the tape back into its slot. The tape library user manual can be downloaded from: http://h20000.www2.hp.com/bizsupport/TechSupport/CoreRedirect.jsp?redirectReason=DocIndexPDF&prodSeriesId=254838&targetPage=http%3A%2F%2Fbizsupport.austin.hp.com%2Fbc%2Fdocs%2Fsupport%2FSupportManual%2Fc01125957%2Fc01125957.pdf Hope this helps. Regards, Kari ------------------------------ Date: Mon, 3 Dec 2007 13:02:53 -0800 (PST) From: Ken.Fairfield@gmail.com Subject: Re: MSL5000 Tape Library tape cleaning? Message-ID: <1f37c3fb-a900-4165-bf3f-f19633f9f137@a39g2000pre.googlegroups.com> On Dec 3, 11:57 am, norm.raph...@metso.com wrote: > I can put the library into maintenance mode and manually select cleaning. > Do you know the password to access that menu from the front panel. I don't know it but I expect it's the default factory password. On an ESL9000 series, that was 4-5-6-7 IIRC. I'll try a couple of variations. So you're saying there's a cleaning function in the Maintenance menu? I'll go look. :-) Thanks, Ken -- Ken & Ann Fairfield What: Ken dot And dot Ann Where: Gmail dot Com ------------------------------ Date: Mon, 3 Dec 2007 13:18:36 -0800 (PST) From: Ken.Fairfield@gmail.com Subject: Re: MSL5000 Tape Library tape cleaning? Message-ID: <36b7d5fa-6528-4166-83ef-ad4f3c7836d5@s19g2000prg.googlegroups.com> On Dec 3, 12:53 pm, Uusim=E4ki wrote: > The cleaning needed will be visible on the library front panel and also > by the drive LEDs. OK, that's what I wanted to know. > Almost all modern tape libraries can be put into "self cleaning mode", > which means that the library will take care of the tape drive cleaning > automatically when needed - all by itself. The library will get the > signal from the tape drive when cleaning is needed and the robotics will > insert the cleaning tape into the correct drive and after the cleaning > pass the robotics move the tape back to its slot. The library also keeps > record of how many times the cleaning tape has been used and it will > discard the tape when the defined amount of cleaning cycles has been > used up. I see. I'll also take Norm's suggestion and see whether automatic cleaning is enabled in the Maintenance Menu. > If you want to do the cleaning manually, you can do it using MRU (robot) > or by tapping on the library front panel soft keys. In both cases you > load the cleaning tape into the drive which needs cleaning and then wait > for the cleaning cycle to be done and then load the tape back into its slo= t. I'm familiar with the manual method. I've got a slightly different problem there in that the cleaning cartridge doesn't show up in the slot list... :-( > The tape library user manual can be downloaded from:http://h20000.www2.hp.= com/bizsupport/TechSupport/CoreRedirect.jsp?red... Thanks, I'll check that out. :-) -Ken ------------------------------ Date: Mon, 3 Dec 2007 16:33:32 -0500 From: norm.raphael@metso.com Subject: Re: MSL5000 Tape Library tape cleaning? Message-ID: This is a multipart message in MIME format. --=_alternative 00766D1F852573A6_= Content-Type: text/plain; charset="US-ASCII" Ken.Fairfield@gmail.com wrote on 12/03/2007 04:02:53 PM: > On Dec 3, 11:57 am, norm.raph...@metso.com wrote: > > I can put the library into maintenance mode and manually select cleaning. > > Do you know the password to access that menu from the front panel. > > I don't know it but I expect it's the default factory password. > On an ESL9000 series, that was 4-5-6-7 IIRC. I'll try a > couple of variations. So you're saying there's a cleaning > function in the Maintenance menu? I'll go look. :-) > I read your other comments elsewhere. Good luck (no sarcasm intended). I really do not think you should publish default factory passwords into an archived newsgroup, though; make the miscreants RTFM. 8-) . > Thanks, Ken > -- > Ken & Ann Fairfield > What: Ken dot And dot Ann > Where: Gmail dot Com --=_alternative 00766D1F852573A6_= Content-Type: text/html; charset="US-ASCII"
Ken.Fairfield@gmail.com wrote on 12/03/2007 04:02:53 PM:

> On Dec 3, 11:57 am, norm.raph...@metso.com wrote:
> > I can put the library into maintenance mode and manually select cleaning.
> > Do you know the password to access that menu from the front panel.
>
> I don't know it but I expect it's the default factory password.
> On an ESL9000 series, that was 4-5-6-7 IIRC.  I'll try a
> couple of variations.  So you're saying there's a cleaning
> function in the Maintenance menu?  I'll go look. :-)
>


I read your other comments elsewhere.  Good luck (no sarcasm intended).

I really do not think you should publish default factory passwords into
an archived newsgroup, though; make the miscreants RTFM.   8-) .

>    Thanks, Ken
> --
> Ken & Ann Fairfield
> What:  Ken dot And dot Ann
> Where: Gmail dot Com
--=_alternative 00766D1F852573A6_=-- ------------------------------ Date: Mon, 3 Dec 2007 14:18:44 -0800 (PST) From: charles.durfee@bassett.org Subject: Re: MSL5000 Tape Library tape cleaning? Message-ID: On Dec 3, 2:20 pm, Ken.Fairfi...@gmail.com wrote: > We have an MSL5000 Storageworks (SDLT) tape library: two SDLT320 > tape drives and 24 tape capacity. (We also have two MSL6000 LTO > tape libraries for which the same question will apply...) > > I haven't dealt with these libraries before. What I find is that > the previous sysmgr (currently out on extended medical leave) has > a cleaning tape loaded in the last slot of the tape "stacker". > What I can see is any front-panel indication of whether a drive > needs to be cleaned, and furthermore, if I do a $ ROBOT SHOW SLOT, > the cleaning tape doesn't appear in the output, even though it has > a "proper" "CLNxxx" barcode label on it. > > My question is two fold: 1) how do you know when a drive needs > to be cleaned, and 2) how do you load a cleaning tape into a > drive if the robot doesn't think there's anything in the slot? > > Related question: are these libraries so smart that they take > care of the cleaning themselves??? > > At issue is that a backup failed over the weekend with a parity > error followed by a fatal controller error (I'd have to go look > at the logs to be more precise), and the drive in question has > been accumulating more than its share of errors (seen from DCL > with SHOW ERROR). I could be a bad tape, but I also wanted to > try cleaning the drive. > > Thanks, Ken > -- > Ken & Ann Fairfield > What: Ken dot And dot Ann > Where: Gmail dot Com For my msl5026, attached to our network, I use its management gui at http:/nnn.nnn.nnn.nnn. We also run 3rd party software for backup, and that gui also allows tape library/drive manipulation. ------------------------------ Date: Mon, 3 Dec 2007 15:16:59 -0800 (PST) From: Ken.Fairfield@gmail.com Subject: Re: MSL5000 Tape Library tape cleaning? Message-ID: On Dec 3, 11:57 am, norm.raph...@metso.com wrote: > I can put the library into maintenance mode and manually select cleaning. > Do you know the password to access that menu from the front panel. I wasn't able to get into the Maintenance Menu (just as well :-), but I did find an option that displayed various settings on the library. That option confirmed several things: 1) the library *is* in auto-cleaning mode, and 2) that one slot is reserved (presumably for a cleaning tape). There were a couple of other settings that looked interesting, and while the library is configured with an IP address, it's not connected to the network (just as well, again, because you don't know what damage I might do if I could get to it :-) :-). Now I'll look at expunging some bad tapes and watch that the drive errors don't come back. Thanks to everyone for the responses, Ken -- Ken & Ann Fairfield What: Ken dot And dot Ann Where: Gmail dot Com ------------------------------ Date: Mon, 3 Dec 2007 16:43:04 -0500 From: "Peter Weaver" Subject: Re: Passing large number of arguments to a program Message-ID: <306101c835f5$7cdc9670$2802a8c0@CHARONLAP> > If the number of arguments exceeds 143, not the leading argument, but the > following leading arguments get clobbered. > (When 144 arguments are used, arguments 2 and 3 get clobbered.) Neat bug! On both Alpha 8.3 and IA64 8.3 the first x arguments get clobbered if you between 144 and 191 arugments. If you pass 143 then you are fine, if you pass 292 or more then you are fine. If you pass 144 then you parameters 1 and 2 are bad, if you pass 291 then the first 175 arguments are clobbered. But pass 292 or more and you are fine until you get over 700 arguments (I tried 300, 400, 500, 600, 700 and 800 but nothing between those numbers). At 800 the first 107 arguments are clobbered. If you have a support contract on you C license I would report it HP. Peter Weaver www.weaverconsulting.ca CHARON-VAX CHARON-AXP DataStream Reflection PreciseMail HP Commercial Hardware ------------------------------ Date: Mon, 03 Dec 2007 23:22:52 +0100 From: Michael Kraemer Subject: Re: Singapore Server Rescue Message-ID: Bill Gunshannon schrieb: > Surely people here realize that comparing clock speeds is totally > meaningless. > I doubt a 100 Mhz RISC system is functionally as fast > as an 80 Mhz VAX. OK, we do not need to speculate, we can have numbers. According to http://tinyurl.com/2276u6 and http://netbsd.nedmirror.nl/docs/Hardware/Machines/DEC/vax/ we have for the 1992/93 timeframe: VS4000-90A 83MHz 39 Spec89 DEC 5260 60 63 DEC 3300L 100 60 HP 720 50 60 HP 735 99 147 ! IBM 350 42 74 so this is quite a collection of contemporary RISC machines with a similar (or even lower) clockrate but significantly higher performance than the (almost) fastest VAX. The RISCs started where the VAX ended. We can also go back further in time, 1990/91: VAX 3100/76 30?MHz 7 Spec89 HP 425t 25 11 DEC 5120 20 16 IBM 320H 25 43 So there's not a single contemporary RISC a VAX could have beaten. Even the 68040 based HP performs better. > It is likely that the 68K died because they opted not to be the one > used for the IBM PC (they did have first shot) and the sheer size of > the created market made Intel (which had one foot int he grave at the > time) a success instead of another blank page in IT history. The 68K did quite well through the 1980s, it was the chip of choice for any modern (i.e. non-PC) computer, Apple,Amiga,Atari, most workstations, embedded, etc. At the turn of the 1990s Motorola somehow lost the track, the 68040 and the especially the 68060 were late to market, and being just on par with intel wasn't enough for Apple and the workstation makers. ------------------------------ Date: Tue, 04 Dec 2007 02:55:58 GMT From: Roger Ivie Subject: Re: Singapore Server Rescue Message-ID: On 2007-12-03, Michael Kraemer wrote: > > OK, we do not need to speculate, we can have numbers. > > VS4000-90A 83MHz 39 Spec89 > DEC 5260 60 63 > DEC 3300L 100 60 You win that round, smart guy. -- roger ivie rivie@ridgenet.net ------------------------------ Date: Mon, 3 Dec 2007 19:07:10 -0800 (PST) From: rx9ent28 Subject: The real way to get on top of GOOGLE... Message-ID: <3074e0d3-646d-4083-b688-72e9a113cbd5@v4g2000hsf.googlegroups.com> I had first page organic results and they delivered on every key term I wanted so here they are http://www.atomicsearchengineoptimization.com or you can go straight to their contct page to get a great free report and a friendly call back. http://www.atomicsearchengineoptimization.com/Monthy_plan_rates-seo-services.html ------------------------------ Date: Mon, 3 Dec 2007 14:35:38 -0800 (PST) From: Pierre Subject: validate username/password against UAF using java ? Message-ID: is it possible to validate a username/password against the UAF using java ? TIA, Pierre. ------------------------------ Date: 3 Dec 2007 17:34:14 -0600 From: Kilgallen@SpamCop.net (Larry Kilgallen) Subject: Re: validate username/password against UAF using java ? Message-ID: In article , Pierre writes: > is it possible to validate a username/password against the UAF using > java ? Certainly. Just call SYS$ACM. ------------------------------ Date: Tue, 4 Dec 2007 08:09:48 +0800 From: "Richard Maher" Subject: Re: validate username/password against UAF using java ? Message-ID: Hi Pierre, > is it possible to validate a username/password against the UAF using > java ? Probably not what you're looking for but a remote Java client example can be found at: - http://manson.vistech.net/t3$examples/demo_client_web.html Username: TIER3_DEMO Password: QUEUE All of the client source code can be found at:- http://manson.vistech.net/t3$examples/ javac Tier3Socket.java javac Tier3Logon.java javac Tier3Welcome.java javac -classpath c:\this\default CornuCopiae.java jar -cf tier3.jar CornuCopiae.class Tier3Socket.class Tier3Logon.class Tier3Welcome.class Tier3Welcome$DateVMS.class As well as complete intrusion detection in line with System Manager configured rules, login-fails, and last non-interactive login time are also maintained. (The client is also informed of failures since last successfule login for extra security) Cheers Richard Maher PS. Alternatively you could probably call sys$acm from a Java server? Good luck :-) "Pierre" wrote in message news:daa14b73-a484-42ba-87d1-43f4de2a2e5d@s19g2000prg.googlegroups.com... > is it possible to validate a username/password against the UAF using > java ? > > TIA, > Pierre. ------------------------------ Date: Mon, 3 Dec 2007 16:12:39 -0800 (PST) From: Bob Gezelter Subject: Re: validate username/password against UAF using java ? Message-ID: <4f68effd-2e0f-47d9-839d-dc44e9815933@l16g2000hsf.googlegroups.com> On Dec 3, 5:35 pm, Pierre wrote: > is it possible to validate a username/password against the UAF using > java ? > > TIA, > Pierre. Pierre, Having worked with the API to call C/C++ routines from Java, it is not a very large scale project to build the necessary function in C, callable from Java as a sharable library to invoke the SYS$ACM and other system services, as appropriate. - Bob Gezelter, http://www.rlgsc.com ------------------------------ Date: Tue, 4 Dec 2007 07:43:10 +0800 From: "Richard Maher" Subject: Walk a mile in their thongs Message-ID: Hi, "FredK" wrote: > I can't imagine why Robert would be anxious to insult or be > insulted by such a swell guy like yourself. You are a model > of civilized discourse. I tell you what Fred, you land me one of those lovely $200K HP/VMS salaries with the "Whatever tickles your fancy" job-descriptions, and just watch the dramatic improvement in my general demeanour. Why, come morning, I'd be surprised if I'm not an absolute fucking paragon of etiquette and decorum. :-) Alternatively, and by way of mitigation, let me give you a brief timeline of my experiences with Digital/Compaq/HP-VMS apparatchiks over the last *ten* or so years. (We moved house recently and I stumbled across some old hard-copy correspondence and I had one of those "See things as they could've been and ask 'Why not?'" moments.) July 1996, (Still in Munich and a lovely time was being had by all) I write to Bill Mathews the then Director of NT Connectivity regarding Tier3 (a then DECnet/VAX-only client/server middleware package I had developed) to see if he could find a place for it in DEC's burgeoning middlware stable. You may recall that this was the "Digital is a software company!" era. To be fair to someone as busy and senior as Bill, he put me onto the "appropriate businees person". So I now make my pitch to Leslie Klein. Unfortunately Leslie's goals were "to provide the legacy OpenVMS customer with vehicles to extend and/or scale his application. . . moving towards industry-standard middleware." - and - "I'd prefer not to trap the OpenVMS customer in a niche solution." "Fair enough" I said, I understand that Digital is not a charity and I'll just have to do it myself. So off I go developing the Alpha and TCP/IP versions of Tier3. In the meantime Digital is afraid to compete with anyone in the software market and gives Rdb to Oracle, DECmessageQ to BEA, Pulls out of All-in-1 and implements Microsoft Exchange, and puts an end to DECdtm and ACMSxp. I guess you do what you think you have to do to get ISVs to continue to support VMS? (Oh, and you also outsource your internal administration and hardware to EDS!) [A few years later. . .] With much fanfare, DEC announces BridgeWorks! (Presumably the much vaunted multivendor, industry-standard solution for legacy OpenVMS customers of which Leslie spoke?) It was still-born and no one wanted it! It was/is an expensive white-elephant, piece 'o shit whose price tag my mind can only boggle at. And then you guys smugly announce that it's not even going to be ported to Itanium! (Paid-off all three users then?) You're a class act alright. But wait! It's not like VMS is a wooden-spooning football team; nobody gets sacked here (certainly not the coach) just get the playbook out and come up with Plan B (or WSIT) Yes, just leave all the same players in all the same positions and see what happens; who cares that not one of your strikers has managed to put a ball in the back of the net in the last *ten* seasons. (Own-goals excepted!) It's not like were in Columbia; we don't sack players, let alone shoot them. (Shame really) [Meanwhile, since about the turn of the century. . .] I've been in contact with John Apps, Mick Keyes and C.J.Coppersmith; primarily looking for native VMS support for the Transaction Internet Protocol (TIP) but again seeking VMS financial support for Tier3. So I go ahead and implement my own MS/DTC TIP<->DECdtm transaction capability for VMS. Digital puts the breaks on COM and COM+ never eventuates. ACMS's latent support for TIP is never acknowledged and *to this day!* no one here even discusses what WS-AT and WS-Coordination is really all about :-( Also the following products have come and gone: - Rally, DECAdmire, Forte, ACMSxp, DCE/RPC, ONC/RPC, Bridgeworks, COM and *still* the longsuffering, yet loyal, VMS customer base screams out for a simple solution. All they want to do is put a Web-Facing browser GUI onto their trusted VMS server applications. They want (and for the last decade have wanted) Tier3! What further saddens me here, is that this newgroup is not full of discussion of the latest GUI implementation of the Rdb SHOW STATISTICS screens or VMS MONITOR screens being incorporated into Flex Charting; and that the WEB-Application ground is still being surrendered to *NIX and Windows :-( But what *really angers* me and something I will just not stand for (again) is when it appears that the same bunch of useless wankers that gave us BridgeWorks and WSIT now intend to sneak gSOAP through the back door via stealth! Now, maybe I've just been talking to the wrong HP people all theses years? Maybe they're no longer with the company, or have been moved to more "appropriate" duties? Who knows who, if anyone, is in charge at HP/VMS middle-management these days? But one thing's for sure, I'm not going to sit back idly and watch HP subsidise some surplus-to-requirements B-team to cut my lunch because they've finally realised they've got it wrong yet again! As for Me these days, when I'm not out talking to lawyers and accountants about setting up License Agreements and Company Structures, I'm cutting code on Linux in order to fund our development team. (And try to diversify our income streams. Hey, maybe HP/VMS would be more interested in Tier3 if it was poorly-performing generic crap being ported back from Linux rather the the VMS specific middleware powerhouse it is today?) I'd much rather be working on the Itanium version of Tier3 and coming up with those Flash and Flex Chart examples but hey, life's tough for everyone and no one's here to listen to me cry into my beer. I gave up long ago looking for HP support for our VMS-centric "niche solution" and believe enough in Tier3 to know that its quality and technical superiority will shine through, but I'll tell ya something; whenever some pointless knob with a HP badge decides to stand up in a public forum and launch an unsubstantiated attack against Tier3 then I'm going to slap him/her down *everytime* as sure as night follows day. Bring it on! I don't need your help but I will not suffer your ignorance! On the other hand, constructive criticism and bug-spotting is always welcomed. Anyway, let me stop here before my bitterness consumes me. I'll go back to my Linux Perl and MySQL and Software Licensing 101, and you can go back to bed-bathing a comatose DECWindows. In the meantime your buddies can continue to do whatever they damned well like: WSIT, gSOAP, Glass Fish, Mono .NET. JSON, JBOSS, JBollocks, As long as the VMS customer's getting what they want - that's the main thing. The good news is you're disappointing less and less of them each year :-( Funny old world really. Regards Richard Maher PS. Not being a big George Michael fan, I still can't help sitting here a tad sun-burnt humming along to: - "Club VMS the drinks are free. . .fun and sunshine, there's enough for all of you . . .". "FredK" wrote in message news:fgnba4$umu$1@usenet01.boi.hp.com... > > "Richard Maher" wrote in message > news:fg1f6f$pdf$1@news-01.bur.connect.com.au... > > Hi Paul, > > > > In my opinion there is rarely a call, or justification, for the use of > > such > > intemperate language in civilized society; not that that has anything to > > do > > with COV (or the world at large :-) > > > > But I'm just curious as to why Robert Whininger hasn't come out in > > sympathy > > with you. I'd certainly hate to think that I was being stalked or that it > > was only my Web Pages that he felt compelled to critique publicly! > > > > I can't imagine why Robert would be anxious to insult or be insulted by such > a swell guy like yourself. You are a model of civilized discourse. > > But more than likely - the fires in San Diego caused a shutdown of the > facility that housed the news server where the feeds come in/out of HP. A > number of us stopped checking after a few days and only now are tuning back > in at all. > > > ------------------------------ Date: Mon, 03 Dec 2007 23:22:02 GMT From: =?ISO-8859-1?Q?Jan-Erik_S=F6derholm?= Subject: Re: Walk a mile in their thongs Message-ID: Richard Maher wrote: a lot of fun reading, as always, but... > intend to sneak gSOAP through the > back door via stealth! Now, say that : 1. There is a server having an SOAP API/interface out there on the net somewere. It's not your server and you have no control over it att all. The only thing you have is the WSDL definition. 2. You'd like your VMS server to act as a client against that API. Now tell me, is Tier3 usable here ? And if not, is there any easier tool the gSOAP to use to run against those API's ? I'm currently using gSOAP to read from a SOAP based API (an online auction site), and it works just fine. I've no idea why you're mixing up gSOAP with the old tools Rally, Forté, Bridgeworks and other, besides of that you don't know what you're talking about. I do agree on one point, it would have been better if gSOAP would have been part of the official "WEB Services" offerings from HP for OpenVMS. Jan-Erik. ------------------------------ Date: Tue, 4 Dec 2007 02:14:23 +0100 From: "Dr. Dweeb" Subject: Re: Walk a mile in their thongs Message-ID: <4754a9ef$0$21927$157c6196@dreader1.cybercity.dk> Jan-Erik Söderholm wrote: > Richard Maher wrote: > > a lot of fun reading, as always, but... > >> intend to sneak gSOAP through the >> back door via stealth! > > Now, say that : > > 1. There is a server having an SOAP API/interface > out there on the net somewere. It's not your > server and you have no control over it att all. > The only thing you have is the WSDL definition. > > 2. You'd like your VMS server to act as a client > against that API. > > Now tell me, is Tier3 usable here ? > > And if not, is there any easier tool the gSOAP > to use to run against those API's ? > > I'm currently using gSOAP to read from a SOAP > based API (an online auction site), and it works > just fine. > > I've no idea why you're mixing up gSOAP with the old > tools Rally, Forté, Bridgeworks and other, besides > of that you don't know what you're talking about. > You are missing the point. Rich is pointing out that the DEC/CPQ/HP suits are batting 0 and 11 (or worse) and he is pointing at the strikes. ie. The products represent choices and decisions that failed. Or to use football terminology, they are 0-11 down and the coach hasn't been fired, and the team is still playing, hoping to luck a consolation time in the referees extra time, before the game is put out of its misery. Dweeb > I do agree on one point, it would have been better > if gSOAP would have been part of the official > "WEB Services" offerings from HP for OpenVMS. > > Jan-Erik. ------------------------------ Date: Mon, 03 Dec 2007 16:31:23 -0800 From: Silver Bells Subject: WANTED: PDSDUMP information from VAX 780 (c1987) Message-ID: <1n79l3ltjjui28b8a7nqrigrld6bki1tqp@4ax.com> I have several large filesarchived using PDSDUMP. All of it from 1987. I believe the PDSDUMP/PDSLOD programs were on the VAX -780 that fronted our Cray-XMP. I would like to obtain working PSCDUMP translators that work on a PC or Mac. But if translators are not available,I would need to know the method of compression the PDSDUMP used. I could write my own (I did that for years at CDC in the 80's.) Thanks---- -Fred Bradford (Los Angeles) ------------------------------ End of INFO-VAX 2007.663 ************************