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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: move specifc fields from one file to another in a sorted way
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: 8593
Location: Back in jolly old England

PostPosted: Mon Dec 12, 2011 9:27 pm    Post subject:
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

Senior Member


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

PostPosted: Tue Dec 13, 2011 3:29 pm    Post subject:
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    Post subject: thanks
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

Senior Member


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

PostPosted: Wed Dec 14, 2011 3:44 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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