Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

to read particular files where labels have been set

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
dilipan

New User


Joined: 09 Mar 2011
Posts: 5
Location: india

PostPosted: Mon Mar 14, 2011 12:10 pm    Post subject: to read particular files where labels have been set
Reply with quote

i have thousands of record in a ps.i want to read only the particular records where labels have been set.
Back to top
View user's profile Send private message

prino

Active Member


Joined: 07 Feb 2009
Posts: 985
Location: Oostende, Belgium

PostPosted: Mon Mar 14, 2011 2:47 pm    Post subject:
Reply with quote

Records in a PS do not have labels, problem solved.
Back to top
View user's profile Send private message
dilipan

New User


Joined: 09 Mar 2011
Posts: 5
Location: india

PostPosted: Mon Mar 14, 2011 2:50 pm    Post subject: Reply to: to read particular files where labels have been se
Reply with quote

thank you...
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Mar 14, 2011 7:50 pm    Post subject:
Reply with quote

Hello,

Now, if you post a bit of sample input data and explain the output you want from this sample data, someone may have a suggestion. . .
Back to top
View user's profile Send private message
dilipan

New User


Joined: 09 Mar 2011
Posts: 5
Location: india

PostPosted: Tue Mar 15, 2011 9:24 am    Post subject: Reply to: to read particular files where labels have been se
Reply with quote

.A 001
000002 002
.B 003
000004 004
000005 005
.D 006
000007 007
000008 008
.C 009
000010 010

i want to retreive only the record which i have set label like .a,.b,.c,.d
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Mar 15, 2011 9:50 am    Post subject:
Reply with quote

Hello,

Read the file.

If the first position of the record is a period (.), do whatever otherwise read the next record.

If this does not answer what you want to do, show the sample output from this sample input.

Also, is there some reason rexx has been chosen?
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Tue Mar 15, 2011 9:57 am    Post subject: Reply to: to read particular files where labels have been se
Reply with quote

> records where labels have been set.

It looks very much like the labels are only in the editor session... please clarify if that is the environment.

note: the labels do not actually exist in the dataset. That is, you cannot save the dataset with the labels.

To find editor labels, use an editor macro with:
Code:

Address ISREDIT
rc = 0
Do while (RC = 0)
  "LOCATE NEXT LABEL"
  If rc = 0 THen
     . . .
End
Back to top
View user's profile Send private message
dilipan

New User


Joined: 09 Mar 2011
Posts: 5
Location: india

PostPosted: Tue Mar 15, 2011 10:07 am    Post subject: Reply to: to read particular files where labels have been se
Reply with quote

hi
i have attached the input what i am given and also attached output what i need.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Mar 15, 2011 8:01 pm    Post subject:
Reply with quote

Hello,

You need to re-post your data using copy/paste and the "Code" tag (as Pedro has done). There is no reason to post "screenshots" to show 3270-screen data. . .

Then explain how the "output" was determined. It is surely not obvious line 000002 was chosen/generated/whatever. . .
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Tue Mar 15, 2011 11:06 pm    Post subject:
Reply with quote

The attached screenshots are in reverse order. Top one is the output, bottom one the input.

This presumes that you want all lines in your edit session which have no prefix labels deleted, isn't that so?

Pedro has already posted the logic to test if a label is set or not...

So the process is: Open the dataset for edit, mark the lines to be retained with labels (You might even define block labels). Run the macro. Save the dataset. You can repeat the labeling and macro execution until satisfied.
If you accidently delete records, you have to use the UNDO command, or possibly cancel edit and start over.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Tue Mar 15, 2011 11:15 pm    Post subject: Reply to: to read particular files where labels have been se
Reply with quote

I suggest the following:

1. add your labels
2. EXCLUDE ALL
3. run macro that locates all labels
4. DELETE ALL X

You can add 2 and 4 to the sample macro.

NOTE: the initial post only mentioned reading particular lines, but the sample output shows the deletion of many records. You need to re-evaluate whether you really want to delete records.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Mar 16, 2011 12:46 am    Post subject: Reply to: to read particular files where labels have been se
Reply with quote

Thanks Kjeld,

Quote:
The attached screenshots are in reverse order. Top one is the output, bottom one the input.
Tough to break my mind from habit. . . Input first - then output - Aaargh. . .

d
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Wed Mar 16, 2011 1:18 am    Post subject:
Reply with quote

This is the typical thread lately.

Topic Starter gives a vauge and incomplete requirement.

The experts swoop in with thier crystal balls and take guesses as to the real requirement. They ask for more information in a effort to get a better understanding of the requirement.

Topic starter gives little tidbits of semi-useful information, usually ignoring the questions for useful information from the experts.

Topic starter looses interest while experts continue with questions and solutions.

Now to this case:

Why are you using labels to identify the lines you want to save?

It is my understanding that labels only stay for the current edit session.
With this being the case, you have one shot to identify your data out of thousands of lines.

It may work better to overlay the zero in position 1 with a K to mark the rows you want to keep.

You can then use commands like Pedro mentioned above.

You can then change all the Ks back to zero afterwards.

I think this is yet another case of the Topic starter, coming up with a ill fated solution, and trying to find a way to make it work.

The forum is much better when the real and complete requirement is clearly stated, so valuable suggestions can be given.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Wed Mar 16, 2011 7:38 pm    Post subject: Reply to: to read particular files where labels have been se
Reply with quote

Quote:
Topic starter looses interest while ...


Another factor in this instance is that the topic was moved to a different forum. I think moving it during the discussion will confuse newcomers. I think it should be moved, but only after it becomes stale.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1717
Location: UK

PostPosted: Thu Mar 17, 2011 12:21 am    Post subject:
Reply with quote

No - move it but pm the OP to say it has been moved and why. This could help them to post correctly next time they haven't googled, read the manuals, read their output messages etc.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts CICS VSAM RLS READ akodakka CICS 3 Tue Oct 04, 2016 3:09 pm
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us