View previous topic :: View next topic
|
Author |
Message |
Shobs
New User
Joined: 21 Jan 2010 Posts: 6 Location: Pune
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Is this a TSO (ISPF?) question? |
|
Back to top |
|
|
Shobs
New User
Joined: 21 Jan 2010 Posts: 6 Location: Pune
|
|
|
|
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 |
|
|
technut
New User
Joined: 27 Dec 2007 Posts: 73 Location: India
|
|
|
|
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 |
|
|
Shobs
New User
Joined: 21 Jan 2010 Posts: 6 Location: Pune
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
In ISPF edit, set bounds to 80 160. Then shift all rows column left. Set bounds back to default. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Just to be pedantic
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Shobs,
If you wanted to delete cols 5 & 6, you could use:
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Thanks Jack - that's perfect... |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
... and the lines of those cards were refered to as rows. The more things change, the more they stay the same. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Ah, Nostalgia, but it's not what it used to be |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
|