Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : programming pearls - The fastest algorithm can frequently be replaced by one that is almost as fast and much easier to understand.

Google
 
Web mainframegurukul.com

Welcome to the mainframegurukul forums.

You are currently viewing our mainframe forums as a guest which gives you limited access to view most discussions, articles. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support at admin@mainframegurukul.com


EDIT a STRING

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> JCL
  View previous topic :: View next topic  
Author Message
mantorras2006
Member


Joined: 19 Apr 2007
Posts: 3

PostPosted: Fri Apr 20, 2007 1:46 am    Post subject: EDIT a STRING Reply with quote

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.
Back to top
View user's profile Send private message

DavidatK
Active Member


Joined: 27 Mar 2007
Posts: 65
Location: Troy, MI USA

PostPosted: Fri Apr 20, 2007 2:34 am    Post subject: Reply with quote

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 Smile . 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
Back to top
View user's profile Send private message
mantorras2006
Member


Joined: 19 Apr 2007
Posts: 3

PostPosted: Fri Apr 20, 2007 1:20 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
acevedo
Member


Joined: 21 Mar 2007
Posts: 12

PostPosted: Fri Apr 20, 2007 1:25 pm    Post subject: Reply with quote

and... depending on what you know the different layout each line has?
_________________
Google is your friend!
Back to top
View user's profile Send private message
mantorras2006
Member


Joined: 19 Apr 2007
Posts: 3

PostPosted: Fri Apr 20, 2007 4:14 pm    Post subject: Reply with quote

have comp's or alphanumerics, but among the field, and i dont know the multiple layouts.
A want to convert a field of line of a file, that i dont know the layout (and have comp's in some positions in a line of the file but in other position of other lines), to a format display (without comp's)
Back to top
View user's profile Send private message
acevedo
Member


Joined: 21 Mar 2007
Posts: 12

PostPosted: Fri Apr 20, 2007 5:17 pm    Post subject: Reply with quote

Quote:
Many of the members here are very good, but not mind readers...


nor any utility.

If I'm not wrong you'll need to specify the start and length of any field you want to convert.
_________________
Google is your friend!
Back to top
View user's profile Send private message
Veera
Moderator


Joined: 22 Feb 2006
Posts: 111

PostPosted: Fri Apr 20, 2007 10:22 pm    Post subject: Reply with quote

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 Smile

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.
Back to top
View user's profile Send private message
Frank Yaeger
Moderator


Joined: 18 Feb 2006
Posts: 487
Location: San Jose, CA

PostPosted: Fri Apr 20, 2007 11:01 pm    Post subject: Reply with quote

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/
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    mainframegurukul.com Forum Index -> JCL 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

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts How to find out the record length using tso command? 4 bsriram 9119 Fri Oct 26, 2007 12:17 am
varun View latest post
No new posts VSAM 1 goalchi27 3268 Wed Mar 21, 2007 6:35 pm
muraligaru1 View latest post
No new posts What is the command in mainframe avoid auto signout(TIMEOUT) 5 rajendra.pallala 4773 Fri Jan 26, 2007 12:48 am
seagreg View latest post
No new posts sort command 1 Priya_mano_c 3559 Wed Nov 15, 2006 11:19 pm
Frank Yaeger View latest post
No new posts Verify command. 3 arrbee 2890 Thu Mar 09, 2006 7:48 pm
arrbee View latest post
 



This widget requires Flash Player 9 or better








Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB