IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Mainframe interview question


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Shobs

New User


Joined: 21 Jan 2010
Posts: 6
Location: Pune

PostPosted: Thu Feb 18, 2010 12:09 pm
Reply with quote

Hi Guys,
I was asked this question in an interview which I could not find and answer which the interviewer was expecting. The question is : 'I have a PS file and I just want to delete a column from that file without using any utility,sort etc. I just want to open the file and delete the column directly. How will I do it?' Can anyone tell me about this please.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Feb 18, 2010 12:13 pm
Reply with quote

Is this a TSO (ISPF?) question?
Back to top
View user's profile Send private message
Shobs

New User


Joined: 21 Jan 2010
Posts: 6
Location: Pune

PostPosted: Thu Feb 18, 2010 12:49 pm
Reply with quote

I guess it is coz I never understood the question properly. He just said that you just have a PS file and you need to delete the column from it without using any utilty. I think there is some command (TSO/ISPF) by which you can do that? Does anyone know about it?
Back to top
View user's profile Send private message
technut

New User


Joined: 27 Dec 2007
Posts: 73
Location: India

PostPosted: Thu Feb 18, 2010 2:30 pm
Reply with quote

I am not sure how to delete a specific line but the specific number of lines can be deleted from the first column by the below operation,
Code:

****** *******
((2    1234556
000002 1234556
000003 1234556
000004 1234556
((     1234556
****** *******


Result:
Code:

****** *****
000001 34556
000002 34556
000003 34556
000004 34556
000005 34556
****** *****


Not sure whether this is what he was looking for!
Back to top
View user's profile Send private message
Shobs

New User


Joined: 21 Jan 2010
Posts: 6
Location: Pune

PostPosted: Fri Feb 19, 2010 2:00 pm
Reply with quote

How to delete a column that is in the middle of the file. Say the LRECL of the file is 160 and i have to delete a column at position 80. How will I do that?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Feb 19, 2010 4:12 pm
Reply with quote

In ISPF edit, set bounds to 80 160. Then shift all rows column left. Set bounds back to default.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Feb 19, 2010 4:15 pm
Reply with quote

Just to be pedantic icon_lol.gif

when we say delete a column, are we talking physically delete the column as in decrement the record length by 1, or simply set the values in that column to blanks.

This just shows how the correct use of terminology is soooooo important.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Feb 19, 2010 8:01 pm
Reply with quote

Also, "column" is a word from DB2-world but not sure how would you refer(what word to use) to refer a " set of vertical characters" in QSAM icon_confused.gif
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Feb 20, 2010 9:05 pm
Reply with quote

Hi Shobs,

If you wanted to delete cols 5 & 6, you could use:
Code:
 
c all 5 p'==' ''
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Feb 22, 2010 5:40 pm
Reply with quote

Thanks Jack - that's perfect...icon_smile.gif
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Mon Feb 22, 2010 8:20 pm
Reply with quote

Quote:
Also, "column" is a word from DB2-world but not sure how would you refer(what word to use) to refer a " set of vertical characters" in QSAM


Back in 1986 when we used punch cards, each of the 80 positions were refered to as column.

This was before DB2 was a twinkle in someones eye icon_lol.gif
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Mon Feb 22, 2010 8:43 pm
Reply with quote

... and the lines of those cards were refered to as rows. The more things change, the more they stay the same. icon_smile.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Feb 22, 2010 9:01 pm
Reply with quote

Ah, Nostalgia, but it's not what it used to be icon_wink.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Feb 22, 2010 9:03 pm
Reply with quote

Quote:
Back in 1986 when we used punch cards, each of the 80 positions were refered to as column.

This was before DB2 was a twinkle in someones eye
IIRC, DB2 was an active product in 1986 -- it dates back to the early 80's. It was based on earlier relational database work done around the mid 70's at IBM. But in 1986 I was definitely still dealing with punched cards. They were dwindling but still around then!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Mainframe openings in Techmahnidra fo... Mainframe Jobs 0
No new posts Question for file manager IBM Tools 7
No new posts Mainframe Programmer with CICS Skill... Mainframe Jobs 0
No new posts How to Reformat a file using File Man... All Other Mainframe Topics 14
No new posts question for Pedro TSO/ISPF 2
Search our Forums:

Back to Top