Re: Simple newbie file tailoring question
David: When you pick up the length of the parm field, make sure it's not zero and if not, decrement it by one and execute the MVC to save it in your initialized area: LR1,0(,R1) LH R2, 0(,r1) LTRR2,R2 BZ NOPARM BCTR R2,R0 EX R2,SAVEPRM B ... SAVEPRM MVC MYPARM(0),2(r1) MPARM DCcl8' ' Initially 8 bytes of blanks Bill> Date: Wed, 30 Apr 2008 11:54:37 -0500> From: [EMAIL PROTECTED]> Subject: Simple newbie file tailoring question> To: IBM-MAIN@BAMA.UA.EDU> > Anyone,> > I'm working with a skeleton that generates an EXEC statement that looks like > this:> > //STEP1 EXEC PGM=MYPROG,REGION=4M,PARM='&ZUSER'> > I wish to pass the value in ZUSER to MYPROG, but I see that if the TSO userid > is < 8 characters long, the trailing blanks from the ZUSER variable are > truncated, and are not being passed to my assembler application. I.e., if the > userid is "USER1", I get a 5-byte parm string instead of an 8-byte parm string > padded with blanks (or nulls, or anything).> > Is there a way to prevent the truncation, so that my application always > receives a full eight-byte value, preferably blank-padded?> > Thank you!> > David> > --> For IBM-MAIN subscribe / signoff / archive access instructions,> send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO> Search the archives at http://bama.ua.edu/archives/ibm-main.html> -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Simple newbie file tailoring question
David Eisenberg wrote: Anyone, I'm working with a skeleton that generates an EXEC statement that looks like this: //STEP1 EXEC PGM=MYPROG,REGION=4M,PARM='&ZUSER' I wish to pass the value in ZUSER to MYPROG, but I see that if the TSO userid is < 8 characters long, the trailing blanks from the ZUSER variable are truncated, and are not being passed to my assembler application. I.e., if the userid is "USER1", I get a 5-byte parm string instead of an 8-byte parm string padded with blanks (or nulls, or anything). Is there a way to prevent the truncation, so that my application always receives a full eight-byte value, preferably blank-padded? Thank you! David If you are z/OS 1.8 or later, you can use the extended built-in function &LEFT, like: )SEL MYUSER=&LEFT(&ZUSER,8) then use &MYUSER in your skeleton Might be simpler just to do the work in your Assembler program, though. We offer a robust, full, rich course in Dialog Manager: five fun-filled, thrill-packed days. Details here: http://www.trainersfriend.com/TSO_Clist_REXX_Dialog_Mgr/a810descrpt.htm Kind regards, -Steve Comstock The Trainer's Friend, Inc. 303-393-8716 http://www.trainersfriend.com z/OS Application development made easier * Our classes include + How things work + Programming examples with realistic applications + Starter / skeleton code + Complete working programs + Useful utilities and subroutines + Tips and techniques ==> Check out the Trainer's Friend Store to purchase z/OS <== ==> application developer toolkits. Sample code in four<== ==> programming languages, JCL to Assemble or compile, <== ==> bind and test. <== ==> http://www.trainersfriend.com/TTFStore/index.html<== -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Simple newbie file tailoring question
>If you are z/OS 1.8 or later< Naturally, we are at z/OS 1.7. This is the sort of thing I was looking for, however. For the time being, I'll just accept the truncated PARM= and deal with it in the application (as per Bill Wilkie's earlier post). Thanks, gentlemen. David -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Simple newbie file tailoring question
> -Original Message- > From: IBM Mainframe Discussion List > [mailto:[EMAIL PROTECTED] On Behalf Of David Eisenberg > Sent: Wednesday, April 30, 2008 12:29 PM > To: IBM-MAIN@BAMA.UA.EDU > Subject: Re: Simple newbie file tailoring question > > >If you are z/OS 1.8 or later< > > Naturally, we are at z/OS 1.7. > > This is the sort of thing I was looking for, however. For the > time being, I'll just > accept the truncated PARM= and deal with it in the > application (as per Bill > Wilkie's earlier post). > > Thanks, gentlemen. > > David Why not just append blanks to the end of the PARM yourself? //STEP1 EXEC PGM=MYPROG,REGION=4M,PARM='&ZUSER' You can then just ignore the extras. This only works if you are only interested in the &ZUSER as your example showed. If you have other parms at "fixed" offsets, then this won't work. -- John McKown Senior Systems Programmer HealthMarkets Keeping the Promise of Affordable Coverage Administrative Services Group Information Technology The information contained in this e-mail message may be privileged and/or confidential. It is for intended addressee(s) only. If you are not the intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication is strictly prohibited and could, in certain circumstances, be a criminal offense. If you have received this e-mail in error, please notify the sender by reply and delete this message without copying or disclosing it. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Simple newbie file tailoring question
>If you have other parms at "fixed" offsets, then this won't work.< I don't have other parms right now, but I would like to reserve the right to do so going forward. That's why I was hoping to force the length of the PARM string to 8. David -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Simple newbie file tailoring question
you could possibly use alternate tabbing (note the exclamation point) in your skeleton: )TBA 49 //STEP1 EXEC PGM=MYPROG,REGION=4M,PARM='&ZUSER!' Thanks, Frank Merlenbach [EMAIL PROTECTED] IBM Mainframe Discussion List wrote on 04/30/2008 11:54:37 AM: > Anyone, > > I'm working with a skeleton that generates an EXEC statement that looks like > this: > > //STEP1 EXEC PGM=MYPROG,REGION=4M,PARM='&ZUSER' > > I wish to pass the value in ZUSER to MYPROG, but I see that if the TSO userid > is < 8 characters long, the trailing blanks from the ZUSER variable are > truncated, and are not being passed to my assembler application. I.e., if the > userid is "USER1", I get a 5-byte parm string instead of an 8-byte > parm string > padded with blanks (or nulls, or anything). > > Is there a way to prevent the truncation, so that my application always > receives a full eight-byte value, preferably blank-padded? > > Thank you! > > David > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO > Search the archives at http://bama.ua.edu/archives/ibm-main.html > -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Simple newbie file tailoring question
On Wed, 30 Apr 2008 11:54:37 -0500, David Eisenberg <[EMAIL PROTECTED]> wrote: >Is there a way to prevent the truncation, so that my application always >receives a full eight-byte value, preferably blank-padded? Bill Wilkie's program approach is the ideal; that being stated, here is how you would do it: REXX: address ISPEXEC "VGET (ZUSER) SHARED" retc = rc parm = substr(zuser,1,8,' ') CLIST: ISPEXEC VGET (ZUSER) SHARED SET &RC=&LASTCC SET &PARM=&SUBSTR(1:8,&STR(&ZUSER )) /* Seven trailing blanks. The SKELS would look like ...PARM='&PARM' Regards, David L. Hempstead Sr. Software Engineer CA, MF Storage Mgmt -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html