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
 

 

Mainframe interview question

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: Mainframe interview question
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: 2150
Location: At my coffee table

PostPosted: Thu Feb 18, 2010 12:13 pm    Post subject:
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    Post subject: Reply to: Mainframe interview question
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    Post subject: Reply to: Mainframe interview question
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    Post subject: Reply to: Mainframe interview question
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: 7914
Location: Bellevue, IA

PostPosted: Fri Feb 19, 2010 4:12 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Feb 19, 2010 4:15 pm    Post subject:
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

Senior Member


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

PostPosted: Fri Feb 19, 2010 8:01 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Mon Feb 22, 2010 5:40 pm    Post subject:
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: 645
Location: Pennsylvania

PostPosted: Mon Feb 22, 2010 8:20 pm    Post subject:
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: 1238
Location: Richfield, MN, USA

PostPosted: Mon Feb 22, 2010 8:43 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Feb 22, 2010 9:01 pm    Post subject:
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: 7914
Location: Bellevue, IA

PostPosted: Mon Feb 22, 2010 9:03 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Urgent Mainframe Requirments (2-10 yr... Shankar779 Mainframe Jobs 0 Sun Nov 27, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Mainframe Developer requirement in Ku... capricorn Mainframe Jobs 0 Sun Oct 23, 2016 3:49 pm
No new posts Interface from Mainframe to Confluenc... hblun CLIST & REXX 4 Tue Sep 20, 2016 5:47 pm
This topic is locked: you cannot edit posts or make replies. Mainframe Admin Openings with CTS enikhilk Mainframe Jobs 0 Tue Sep 13, 2016 10:13 am
No new posts Cards mainframe developer requirement... capricorn Mainframe Jobs 0 Sun Sep 11, 2016 9:57 am


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