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
 

 

How toWrite record count of a flat file to another flat file

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

New User


Joined: 26 Jul 2008
Posts: 15
Location: Jefferson city, MO, USA

PostPosted: Tue Jul 29, 2008 1:03 am    Post subject: How toWrite record count of a flat file to another flat file
Reply with quote

I got from the forum that using the following code we can get the
record count of a flat file into another flat file

OPTION COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(COUNT=(M11,LENGTH=8))

My requirement is to get the System date.
Number of records from the input file.
Using the following structure write (append) it to another flat file.

Structure of the Output file is

1:10 --> System Date
11:3 --> '033' (Hard Coded value. This remains constant always)
14:10 --> 'Table Name' (Hard Coded value. This remains constant always)
24:12 --> Records Count
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 Jul 29, 2008 1:26 am    Post subject:
Reply with quote

You can use a DFSORT job like this to do what you asked for. I assumed you wanted the system date in the form 'yyyy/mm/dd', but you can change the job to create other forms of the date, as appropriate.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file (FB/35)
//SYSIN    DD    *
  OPTION COPY
  OUTFIL REMOVECC,NODETAIL,
    BUILD=(35X),
    TRAILER1=(DATE=(4MD/),'033','TABLE NAME',
      COUNT=(M11,LENGTH=12))
/*
Back to top
View user's profile Send private message
mturangi

New User


Joined: 26 Jul 2008
Posts: 15
Location: Jefferson city, MO, USA

PostPosted: Tue Jul 29, 2008 2:40 am    Post subject: Reply to: How toWrite record count of a flat file to another
Reply with quote

Thank You Frank for Your Quick Response.

In our facility we are using SYNCSORT version 1.2.0.1R.
When I ran the JCL it gave me error on BUILD parameter. I am not sure if this version supports this Parameter.
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 Jul 29, 2008 2:51 am    Post subject:
Reply with quote

Sigh. This is the DFSORT Forum for questions on DFSORT and DFSORT's ICETOOL. Please post Syncsort questions in the JCL Forum.

The job works fine with DFSORT.

I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm


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