MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with CHANGE command

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Mon Oct 27, 2014 7:51 am    Post subject: Problem with CHANGE command Reply with quote

This seems really stupid, but I'm obviously missing something somewhere.

I have a simple sequential file with 81 characters in it. The first 4 are garbage that I want to remove. I've tried everything (?) but keep on failing on the actual change command. The data looks like this

Code:

 `  X1002.00S21+00040CRE-WIRATG-IPDK-001     00+0000M23+00029SHBGG507  0
0500EFFFF4FFEFF4FFFFFCDC6ECDCEC6CDCD6FFF44444FF4FFFFDFF4FFFFFECCCCFFF44F
013071002B00221E0004039506991370974200010000000E0000423E0002928277507000


and scrolling to the right I have

Code:

300000018
FFFFFFFFF
300000018


I have set the bounds to 1 81, but when I try the change command (either as cha p'====' '' or cha '00510300'x '') I suddenly see the 4 bytes I want removed being inserted as extra blanks after the IPDK-001 as shown here
Code:

X1002.00S21+00040CRE-WIRATG-IPDK-001         00+0000M23+00029SHBGG507  0
EFFFF4FFEFF4FFFFFCDC6ECDCEC6CDCD6FFF444444444FF4FFFFDFF4FFFFFECCCCFFF44F
71002B00221E00040395069913709742000100000000000E0000423E0002928277507000


Can anyone point me in the right direction as to what I'm doing wrong ?
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Mon Oct 27, 2014 8:22 am    Post subject: Reply with quote

Those 1st 4 bytes look like the RDW of a variable length record. X'0051' = decimal 81 and X'0300' = decimal 768. I don't think the RDW of a varible length record is available for editing. If you want to remove it, I think you'll need to copy this VB file to an FB one. It would help if you had done a "col" in your editing session to make it easier for us to see the exact columns.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
William Collins
Supermod


Joined: 03 Jun 2012
Posts: 437
Topics: 0

PostPosted: Mon Oct 27, 2014 9:23 am    Post subject: Reply with quote

That first lump of characters are being treated as a "word" contiguous with what you want to remove. The "word" will be shifted left/right if the replacement is shorter/longer and will leave the next "word" alone, unless the change makes the first word long enough such that it would otherwise "crash" into the second word, when the second word will be shifted right with one space between the two words.

If you just want to chop off the first four bytes of a line/block try (4/((4 in the line command area. You will receive the four blanks at finishing at the end of the bounds.
Back to top
View user's profile Send private message
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Tue Oct 28, 2014 6:30 am    Post subject: Reply with quote

Terry - they're actually the outgoing result from an IMS transaction, so the length would be the length of the trans. The file is already FB (91 bytes). Sorry that I can't seem to upload an attachment showing the layout, but the first X is in column 5

William - I should have mentioned that I'm trying to remove those 4 bytes via an edit macro (which is when I started seeing the "problem"). To my knowledge, you can't (?) do a (4 as a prefix command in a macro
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Tue Oct 28, 2014 6:45 am    Post subject: Reply with quote

Quick append to the previous one. After googling, I found the following command (no idea it existed)
Code:

"SHIFT ( .zcsr "i - 1

where i was (in this case) 5.

That did the trick
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Oct 28, 2014 10:38 am    Post subject: Reply with quote

misi01 wrote:
William - I should have mentioned that I'm trying to remove those 4 bytes via an edit macro (which is when I started seeing the "problem"). To my knowledge, you can't (?) do a (4 as a prefix command in a macro



ADDRESS ISREDIT "MACRO PROCESS". PROCESS (the default) says that the Editor should process line commands, such as A and C, before executing your macro.


With z/OS 1.13 you can issue Line command macro. Check this link

http://publibfp.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/ispzem90/1.1.5.2?
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group