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
 

 

pleas help me in formatting the the file by using ICETOOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Madhuri Polimetla

New User


Joined: 27 Feb 2008
Posts: 3
Location: hyderabad

PostPosted: Mon Nov 17, 2008 7:48 pm    Post subject: pleas help me in formatting the the file by using ICETOOL
Reply with quote

Hi,
I want to reformat a file with LRECL=126 into the below format.changes need to do are in bold.As i haven't use ICETOOL finding bit difficult.please help me

Header:
Col character_lenght notes
1 3 constant
4 3 constant-left justify
7 20 constant-left justify

Detail:
col character_length notes
1 3 constant
27 17 constant-left justify
44 20 constant-left justify
64 28 right justified with spaces
92 10 date in YYYYMMDD format
112 15 left justified with spaces except add a zero before
the value
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: Mon Nov 17, 2008 11:21 pm    Post subject:
Reply with quote

Please show an example of the records in the input file and the expected output records.

What is the RECFM and LRECL of the input file?
Back to top
View user's profile Send private message
Madhuri Polimetla

New User


Joined: 27 Feb 2008
Posts: 3
Location: hyderabad

PostPosted: Tue Nov 18, 2008 1:27 pm    Post subject: Reply to: pleas help me in formatting the the file by using
Reply with quote

LRECL =126,RECFM =F for both input and output files.

Input file description:
header:
pos value in field
1-3 000
4-3 1 (first 2 are spaces)
7-20 72341765 (first and last 6 are spaces ,data is in the middle)

Detail:
pos value in field
1-3 110
4-26 spaces-no data
27-43 8901034567 (first 8 are spaces then data )
44-63 tmt (first 17 are spaces then value 'tmt')
64-91 0000043634(first 19 are spaces then value)
92-101 20081118(date in YYYYMMDD format with leading 2 spaces)
102-111 spaces-no data
112-126 0000038164(first 5 are spaces then data starts with zeros)

Output needs to be:
Header:
pos value in field
1-3 000(no change)
4-3 1 (left justify with spaces)
7-20 72341765 (left justify with spaces)

detail:
pos value in field
1-3 110(no change)
4-26 spaces-no data(no change)
27-43 8901034567 (left justify-i.e first data starts then with 8 trailing spaces)
44-63 tmt (left justify-i.e. first 'tmt' then 17 trailing spaces)
64-91 000000000000000043634(instead of leading spaces and >0 we need to move zeros then data)
92-101 20081118(no change)
102-111 spaces-no data(no change)
112-126 038164(left justify with spaces and add zero before the value

Please let me know if you need more information

Appreciate your help in advance
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: Wed Nov 19, 2008 12:11 am    Post subject:
Reply with quote

Your descriptions are a bit difficult to follow, but here's a DFSORT job that will do what you asked for based on my best guess of what your data looks like from the descriptions you gave. Change as needed.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=... input file (FB/126)
//SORTOUT DD DSN=...  output file (FB/126)
//SYSIN    DD    *
  OPTION COPY
  INREC IFOUTLEN=126,
    IFTHEN=(WHEN=(1,3,CH,EQ,C'000'),
      BUILD=(1,3,4,3,JFY=(SHIFT=LEFT),7,20,JFY=(SHIFT=LEFT))),
  IFTHEN=(WHEN=NONE,BUILD=(1,3,27:27,17,JFY=(SHIFT=LEFT),     
     44:44,20,JFY=(SHIFT=LEFT),64:64,28,UFF,M11,LENGTH=21,   
     92:92,10,112:112,15,UFF,M10,LENGTH=15)),                 
  IFTHEN=(WHEN=NONE,                                         
    OVERLAY=(112:112,15,JFY=(SHIFT=LEFT,LEAD=C'0')))         
/*
Back to top
View user's profile Send private message
Madhuri Polimetla

New User


Joined: 27 Feb 2008
Posts: 3
Location: hyderabad

PostPosted: Wed Nov 19, 2008 3:19 pm    Post subject: Reply to: pleas help me in formatting the the file by using
Reply with quote

Thank you very much.This code is working fine
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: Wed Nov 19, 2008 9:15 pm    Post subject:
Reply with quote

Actually, it won't work correctly if the numeric value in 112-126 has trailing zeros (e.g. 12300). So I've changed my post above to use the correct control statements for handling that situation.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


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