EDIT a STRING
Moderators: Frank Yaeger, DikDude, Moderator Group
-
- Member
- Posts: 3
- Joined: Thu Apr 19, 2007 7:27 pm
EDIT a STRING
I need to convert a string of a file that have a variable part (with comp's and alphanumerics) to a string with a format edit. But the layout of the string is variable in every line of a file.
The command edit dont work.
The command edit dont work.
My friend,
You?re going to have to give us more information than that. Many of the members here are very good, but not mind readers . Can you please give us some examples of the input you?re dealing with and what needs to be done with it? Please be very specific in your examples and processing. The more specific you are the more specific we can be with a solution.
Thanks, and post back soon
Dave
You?re going to have to give us more information than that. Many of the members here are very good, but not mind readers . Can you please give us some examples of the input you?re dealing with and what needs to be done with it? Please be very specific in your examples and processing. The more specific you are the more specific we can be with a solution.
Thanks, and post back soon
Dave
-
- Member
- Posts: 3
- Joined: Thu Apr 19, 2007 7:27 pm
Thank for your point Dave, but i dont need that you gave me the exact jcl code, but the instruction or instructions that made my wish possible (no need for mind readers)
The file (with hexa):
000000000000002
FFFFFFFFFFFFFFF4444444444444444444444444
0000000000000020000000000000000000000000
----------------------------------------
PT 00352007010901000000022
DE4FFFFFFFFFFFFFFFFFFFFFFF44444444444444
7300035200701090100000002200000000000000
----------------------------------------
PT 00352007010901000000022
DE4FFFFFFFFFFFFFFFFFFFFFFF44444444444444
7300035200701090100000002200000000000000
----------------------------------------
06PT * @ j< ?
FFDE005007000394007210003000044444444444
067303C20C00431C2002C000C000C00000000000
As you can see in each line have have a different layout. I want to convert this in a string with no comps but i dont not how because a dont know the multiple layouts of each line.
The file (with hexa):
000000000000002
FFFFFFFFFFFFFFF4444444444444444444444444
0000000000000020000000000000000000000000
----------------------------------------
PT 00352007010901000000022
DE4FFFFFFFFFFFFFFFFFFFFFFF44444444444444
7300035200701090100000002200000000000000
----------------------------------------
PT 00352007010901000000022
DE4FFFFFFFFFFFFFFFFFFFFFFF44444444444444
7300035200701090100000002200000000000000
----------------------------------------
06PT * @ j< ?
FFDE005007000394007210003000044444444444
067303C20C00431C2002C000C000C00000000000
As you can see in each line have have a different layout. I want to convert this in a string with no comps but i dont not how because a dont know the multiple layouts of each line.
-
- Member
- Posts: 3
- Joined: Thu Apr 19, 2007 7:27 pm
mantorras2006,
Where and how is this file being generated in your system.
If this particular file is being read as I/P for some programs or O/P for programs then there should be some way of identifying each record and then it processes it.
well If this file is not generated by the system then one has to think
And as acevedo mentioned one should definitely need the start and end position by which we can try some means ??? that info wud be useful.
I was just thinking
If we have COMP filed and we need to convert ...the usual way of doing it wud be to declare a equivalent numeric variable and then
redefine it into a alphanumeric.
If i am not wrong if you can come up with some details reg the start and end positions i blive there is a way in SORT by which we can convert the
data types. I am not sure , but yes if you come back with details i am sure we can get info from Frank on SORT and figure out a means to do.
Thanks,
Veera.
Where and how is this file being generated in your system.
If this particular file is being read as I/P for some programs or O/P for programs then there should be some way of identifying each record and then it processes it.
well If this file is not generated by the system then one has to think
And as acevedo mentioned one should definitely need the start and end position by which we can try some means ??? that info wud be useful.
I was just thinking
If we have COMP filed and we need to convert ...the usual way of doing it wud be to declare a equivalent numeric variable and then
redefine it into a alphanumeric.
If i am not wrong if you can come up with some details reg the start and end positions i blive there is a way in SORT by which we can convert the
data types. I am not sure , but yes if you come back with details i am sure we can get info from Frank on SORT and figure out a means to do.
Thanks,
Veera.
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
Yes, DFSORT can convert BI values to formatted numeric values, but you have to know the starting position and length of each value to be converted. All data is binary - the interpretation of the data may be other than binary but there's no magic way for a program to know that unless there are specific rules such as "the binary field is from positions 5-8" or "each binary field starts with X'FFFF' and is 4 bytes long".
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page