View previous topic :: View next topic |
Author |
Message |
Kautilya Beginner
Joined: 24 Jan 2004 Posts: 8 Topics: 2
|
Posted: Fri Dec 30, 2005 4:28 am Post subject: Problem in Assembler Coding. |
|
|
Right now I am writing an assembler program to find the record length, starting point and length of key and number of records in VSAM using SHOWCB. The values are obtained in a variable DSP which is 4F. I am then using DSECT DSP1 and then getting the lengths in variable L1, L2, L3 and L4. After that I am trying to convert the L1, L2, L3 and L4 to zoned decimal format. But when I execute the line "CVD 3,PKD" the value of L4 is getting changed. On debugging in intertest and found out that PKD is overlapping the memory occupied by L4. I have tried different methods to overcome this but everthing is failing. Any idea what I need to do. Please Advice.
Code: |
DSP1 DSECT
L1 DS F
L2 DS F
L3 DS F
L4 DS F
DATASET DSECT
DSNAME DS CL44
ALLOC5 START
SAVE (14,12)
BALR 12,0
USING *,12
B START1
.
.
.
SPARA SHOWCB ACB=BLOCK,AREA=DSP,FIELDS=(KEYLEN,NLOGR,RKP,LRECL), X
LENGTH=16
LTR 15,15
BZ NOERR1
MVC DSNAME1,=CL44' '
MVC DSNAME1(22),=C'ERROR: ERROR IN SHOWCB'
B ENDPGM
NOERR1 L 4,=A(DSP)
USING DSP1,4
L 3,L1
CVD 3,PKD
MVC DSNAME1,=CL44' '
MVC DSNAME1,=X'40212020202020202020202020202020'
.
.
.
.
DSP DS 4F
PKD DS PL8
|
Regards
Praveen |
|
Back to top |
|
|
Bill Dennis Advanced
Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Fri Dec 30, 2005 11:36 am Post subject: |
|
|
Perhaps addresability to PKD is messed up by the USING for DSP. Move the DSP fields to the end (after PKD). _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity. |
|
Back to top |
|
|
Kautilya Beginner
Joined: 24 Jan 2004 Posts: 8 Topics: 2
|
Posted: Sat Dec 31, 2005 4:05 am Post subject: |
|
|
Hi Bill,
I just tried out that but it isn't working.
Regards
Praveen |
|
Back to top |
|
|
Kautilya Beginner
Joined: 24 Jan 2004 Posts: 8 Topics: 2
|
Posted: Sat Dec 31, 2005 4:05 am Post subject: |
|
|
Hi Bill,
I just tried out that but the result remains the same.
Regards
Praveen |
|
Back to top |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Sat Dec 31, 2005 11:48 am Post subject: |
|
|
Praveen,
I think you need to show a little more of your program. In particular, show the few lines before DSP and after PKD. Where are BLOCK and DSNAME1 for example? _________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
|
DaveyC Moderator
Joined: 02 Dec 2002 Posts: 151 Topics: 3 Location: Perth, Western Australia
|
Posted: Thu Jan 05, 2006 8:35 am Post subject: |
|
|
Also the correct way to initialise a buffer is like this:
Code: |
MVI DSNAME,C' '
MVC DSNAME+1(L'DSNAME-1),DSNAME
|
_________________ Dave Crayford
Last edited by DaveyC on Thu Jan 05, 2006 8:58 am; edited 2 times in total |
|
Back to top |
|
|
Bill Dennis Advanced
Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Thu Jan 05, 2006 8:46 am Post subject: |
|
|
Dave,
Your way uses fewer bytes of memory but it's not necessarily the "correct" way.
Praveen,
Why clear DSNAME1 first if you're going to move an EDIT mask into it? Is the EDIT mask a full 44 bytes? _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Last edited by Bill Dennis on Thu Jan 05, 2006 8:57 am; edited 1 time in total |
|
Back to top |
|
|
DaveyC Moderator
Joined: 02 Dec 2002 Posts: 151 Topics: 3 Location: Perth, Western Australia
|
Posted: Thu Jan 05, 2006 8:54 am Post subject: |
|
|
Quote: |
You're missing the "from" operand on the MVC. Please correct your post.
|
Thanks Bill, have done...
Quote: |
Your way uses fewer bytes of memory but it's not necessarily the "correct" way.
|
We will have to agree to disagree about that. I like to keep my literal pools nice and short. _________________ Dave Crayford |
|
Back to top |
|
|
Bill Dennis Advanced
Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Thu Jan 05, 2006 8:56 am Post subject: |
|
|
<deleted> _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Last edited by Bill Dennis on Thu Jan 05, 2006 10:41 am; edited 1 time in total |
|
Back to top |
|
|
DaveyC Moderator
Joined: 02 Dec 2002 Posts: 151 Topics: 3 Location: Perth, Western Australia
|
Posted: Thu Jan 05, 2006 8:59 am Post subject: |
|
|
I've desk checked my work, and I think I'm alright <grin> _________________ Dave Crayford |
|
Back to top |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Thu Jan 05, 2006 9:19 am Post subject: |
|
|
Now you need to unit test, system test, get the users to test, and pass the Change Approval Board. Have you got six weeks? _________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
|
DaveyC Moderator
Joined: 02 Dec 2002 Posts: 151 Topics: 3 Location: Perth, Western Australia
|
Posted: Thu Jan 05, 2006 9:37 am Post subject: |
|
|
No, and my best work is not done after a couple of bottles of Fullers ESB! It's 10.00pm down under and 35c today... Hows the weather back home Merv? _________________ Dave Crayford |
|
Back to top |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Thu Jan 05, 2006 10:16 am Post subject: |
|
|
Looking like snow, mate. Glad you can still find something proper to drink!
Happy New Year! _________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
|
|
|