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

move specifc fields from one file to another in a sorted way


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Bahugun

New User


Joined: 07 Jul 2010
Posts: 24
Location: hyderabad

PostPosted: Mon Dec 12, 2011 8:53 pm
Reply with quote

hi all,

this is the process i usually follow.
i use File-AID .
i have a GDG file which has many records.EG:a111.b111.c111v00
and in a PDS "P111.p222.p333",member "P9330PLX" has the copybook format in it
with the above info i enter the file aid and sort the file on this condition

Code:
10 PLFX-COS-ADJ-FLG           1/AN   =  M


so then i start manually coping the below fields in an excel sheet

Code:
 10 PLFX-AMOUNT               DISPLAY 0000008250}     
                                        11/SNUM -825.00         
 10 PLFX-STE                          3/AN   ABA       


the amount field is displayed in HEXADECIMAL.which is converted to decimal as specified in the above example
below are details from the copybook
Code:
FIELD LEVEL/NAME -------PICTURE- -NUMBER START   END  LENGTH
10 PLFX-AMOUNT          S9(9)V99        36         42       52       11
10 PLFX-STE                     XXX           37          53      55       3
10 PLFX-COS-ADJ-FLG       X               53         133     133      1


ISSUE:
as i am doing the above process manually.i would like to have a JCL which would create a file where the amount(decimal format) and the PLFX-STE are saved.
Code:
EG:
PLFX-STE       PLFX-AMOUNT 
ABA                -825.00
AAA                -451.21

ETC
Now "Code'd", but was mis-aligned manually in the original post. . .

thank you for your time.

regards
Bahugun
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Dec 12, 2011 9:27 pm
Reply with quote

Then you will be unlucky.
JCL does nothing but invoke programs which perform the processing.
So which program do you wish to use to do this with.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Tue Dec 13, 2011 3:29 pm
Reply with quote

If the way you've described your problem is same as you percept it - there is a very hard way ahead of you!

What does the word "sort" mean to you? When you say this (I've added the code tags here):
Quote:
with the above info i enter the file aid and sort the file on this condition

Code:
10 PLFX-COS-ADJ-FLG 1/AN = M

so then i start manually coping the below fields in an excel sheet
then File-Aid "does not sort data on this criteria" instead it "filters the data" on PLFX-COS-ADJ-FLG = M.

I read it many times but don't understand it - what do you mean by this:
Quote:
the amount field is displayed in HEXADECIMAL.which is converted to decimal as specified in the above example
below are details from the copybook
Back to top
View user's profile Send private message
Bahugun

New User


Joined: 07 Jul 2010
Posts: 24
Location: hyderabad

PostPosted: Wed Dec 14, 2011 3:23 pm
Reply with quote

sorry for using the wrong word sort.i should i have used the word filter.

but never mind.i was able to come up with an alternative.
so thanks for your time

have a great day

regards
Bahugun
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Wed Dec 14, 2011 3:44 pm
Reply with quote

Glad, you got it working!
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top