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

INTEREVIEW QUESTION


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

New User


Joined: 05 May 2005
Posts: 50

PostPosted: Wed Jun 29, 2005 9:01 pm
Reply with quote

HI,

I WANT MOVE THE RECORDS FROM ONE SEQUENTIAL FILE TO ANOTHER
EXCLUDING A PARTICULAR FIELD OR RECORD.

FOR EXAMPLE:

IAM HAVING TO PS FILES CALLED PS1,PS2.

PS1 CONTAINS RECORDS.
PS2 IS EMPTY.

THE RECORDS IN THE PS1 ARE:

***************************
111 AAA 500 44


222 BBB 300 55

333 CCC 400 66

444 DDD 600 55
*************************

1) WHILE COPYING FROM PS1 TO PS2 I HAVE TO EXCLUDE OR OMIT
A PARTICULAR RECCORD,

2) WHILE COPYING FROM PS1 TO PS2 I HAVE TO EXCLUDE OR OMIT
A SPECIFIC FIELD IN A PARTICULAR RECORD


I WANT JCL CODINGS FOR ABOVE SITUATION.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Wed Jun 29, 2005 9:09 pm
Reply with quote

Quote:
1) WHILE COPYING FROM PS1 TO PS2 I HAVE TO EXCLUDE OR OMIT
A PARTICULAR RECCORD,

2) WHILE COPYING FROM PS1 TO PS2 I HAVE TO EXCLUDE OR OMIT
A SPECIFIC FIELD IN A PARTICULAR RECORD


Please be more clear......what is that perticular record.......

or give example for O/P file too....

Regards,

Priyesh.
Back to top
View user's profile Send private message
rssomm

New User


Joined: 05 Jun 2005
Posts: 41
Location: Hyderabad

PostPosted: Wed Jun 29, 2005 10:13 pm
Reply with quote

You can omit any record using OMIT COND option of DFSORT.

For Example to omit the first record u can use this option as
OMIT COND=(1,3,CH,EQ,'111') or
OMIT COND=(4,3,CH,EQ,'AAA') or
OMIT COND=(7,3,CH,EQ,'500') or
OMIT COND=(10,2,CH,EQ,'44').

To omit any field u can use the option OUTREC.
For example to omit second field u can code as follows.
OUTREC=(1,3,7,3,10,2)

The above example reformats the record so that it consists of the first 3 bytes of the input record, followed by the 3 bytes starting at position 7, followed by the 2 bytes starting at position 10.


Hope this will help you.

Madhu
Back to top
View user's profile Send private message
nandakumar
Warnings : 2

New User


Joined: 05 May 2005
Posts: 50

PostPosted: Thu Jun 30, 2005 8:31 am
Reply with quote

hi,

i am having reccords like this in my ps1:( I AM GIVING COLUMN NAMES FOR UR EASY UNDERSTANDING ONLY,ACTUALLY IAM NOT USING IT).

ENO ENAME ESAL

01 AAA 1000

02 BBB 2000

03 CCC 3000

04 DDD 4000


i am going to copy the content of ps1 to ps2.

while doing so, i want to exclude a record for example :

01 AAA 1000 THIS PARTICULAR RECORD SHOULD NOT BE COPIED TO PS2.


ANOTHER THING IS IF I WANT TO OMIT ANY PARTICULAR FIELD ONLY
SUCH AS: 01 (OR) AAA (OR) 1000 WHILE COPYING WHAT SHOULD I
DO:
Back to top
View user's profile Send private message
rssomm

New User


Joined: 05 Jun 2005
Posts: 41
Location: Hyderabad

PostPosted: Thu Jun 30, 2005 1:52 pm
Reply with quote

Nanda Kumar,

I have understood ur requirements. Please read my prev answers and code accordingly. It will solve ur problem.

madhu
Back to top
View user's profile Send private message
nandakumar
Warnings : 2

New User


Joined: 05 May 2005
Posts: 50

PostPosted: Fri Jul 01, 2005 12:06 am
Reply with quote

hi,

i could not get the answer for my above specified doubt,from previously
posted answers.
Back to top
View user's profile Send private message
nandakumar
Warnings : 2

New User


Joined: 05 May 2005
Posts: 50

PostPosted: Fri Jul 01, 2005 9:42 am
Reply with quote

hi,
is there any options using iceman utility?
Back to top
View user's profile Send private message
puneet_83

New User


Joined: 06 Jul 2005
Posts: 1

PostPosted: Wed Jul 06, 2005 9:37 pm
Reply with quote

Hi ,

For Skipping a Particular Field , you need to use DFSORT utility by using
"OMIT FIELDS " in the SORT card and mentionig the starting byte and character name in it .
FOr excluding particular record,please try using SKIPRCD=(record number ) in the SORT card.

Do let me know if you need more information.

Thanks,
Puneet
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 Question for file manager IBM Tools 7
No new posts question for Pedro TSO/ISPF 2
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts panel creation question TSO/ISPF 12
No new posts Sort w/OUTREC Question DFSORT/ICETOOL 2
Search our Forums:

Back to Top