Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
extract data from header record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ARIVUMR

New User


Joined: 21 Apr 2006
Posts: 11
Location: Chennai

PostPosted: Fri Oct 22, 2010 1:32 pm    Post subject: extract data from header record
Reply with quote

I need to extract data from header record and insert in each trailer record till next header record comes.

eg

header record SSN

XXXXXXXdetail record ....
XXXXXXX details record...
trailer record

header record SSN
XXXXXXXdetail record
.......
....

i need to take SSN number from header and insert into in-front (XXXXXXX) of every detail record till next header record.
each header record has different ssn number so i need to insert ssn number in detail record from corresponding header record ssn.
finally remove all the header and trailer record.

Can any one please tell me the solution in ICETOOL or SORT?

advance thanks.

Thanks
Hari
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 Oct 22, 2010 1:46 pm    Post subject:
Reply with quote

You ask for an ICETOOL / SORT solution, but have posted in the JCL forum which is for SYNCSORT.

Please run the code below and post all of the SYSOUT JES segment to let us see the sort product and release level that you are using.
Code:
//SORTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY

Also tell us the RECFM and LRECL of the input / output files, and the position, length and data format of the key fields.
Back to top
View user's profile Send private message
ARIVUMR

New User


Joined: 21 Apr 2006
Posts: 11
Location: Chennai

PostPosted: Fri Oct 22, 2010 2:30 pm    Post subject:
Reply with quote

Thank you for immediate response..

My version of sort product is Z/OS DFSORT V1R10 .

input file is flat file and length is 200. extract data position from header record is 8 & length is 5 ( 8 to 12 ) its numeric character.

output file length 205 (flat file) and insert SSN in to detail record in first 5 position. totally 205 length of output file ( 5 (SSN) + 200 bytes of detail record).

Both are fixed block only.

Thanks
Hari
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 Oct 22, 2010 2:45 pm    Post subject:
Reply with quote

The reason I asked for the SYSOUT was that the DFSORT guys really like to see this line to show the release level
Code:
ICE201I G RECORD TYPE IS F - DATA STARTS IN POSITION 1
Back to top
View user's profile Send private message
ARIVUMR

New User


Joined: 21 Apr 2006
Posts: 11
Location: Chennai

PostPosted: Fri Oct 22, 2010 3:09 pm    Post subject:
Reply with quote

Yes i submitted that code , its abend but when i see the sysout same msg displayed there like this :

ICE201I G RECORD TYPE IS F - DATA STARTS IN POSITION 1

do you want me to post that screen , i will do if you need ...

thanks hari
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Oct 22, 2010 11:19 pm    Post subject:
Reply with quote

How do you identify a header record (e.g. it has 'H' in position 1)?

How do you identify a trailer record (e.g. it has 'T' in position 1)?

How do you identify a detail record (e.g. it has 'D' in position 1)?
Back to top
View user's profile Send private message
ARIVUMR

New User


Joined: 21 Apr 2006
Posts: 11
Location: Chennai

PostPosted: Tue Oct 26, 2010 2:26 pm    Post subject:
Reply with quote

Thanks

header record identified by STATE starting first position length 5 after tat SSN number
detail record starting from 1 st position..
Trailer record starting with END from 1st position & length is 3 then noting...

Thanks
hari
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Oct 26, 2010 8:27 pm    Post subject:
Reply with quote

Your description of how to identify the different types of records is unclear. Please show an example and give a description that correspond to each other.
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Spool Extract for Z /os 1.04 version Khadhar Basha CLIST & REXX 3 Thu Sep 28, 2017 3:14 pm
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us