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

Inserting a '0' in the first record-carriage return


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
appu.venkat

New User


Joined: 29 Jan 2007
Posts: 22
Location: India

PostPosted: Mon Jan 29, 2007 2:29 pm
Reply with quote

i would like to know how to insert a '0' in the first column of every first record of a page.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Jan 29, 2007 2:38 pm
Reply with quote

appu.venkat wrote:
i would like to know how to insert a '0' in the first column of every first record of a page.
Should be no problem, if you have a way to identify the "first record of a page", do you?
Back to top
View user's profile Send private message
appu.venkat

New User


Joined: 29 Jan 2007
Posts: 22
Location: India

PostPosted: Mon Jan 29, 2007 2:41 pm
Reply with quote

yes,the only identification i could give u is that there is a title before the record and also a page number in the same like as the title
Back to top
View user's profile Send private message
appu.venkat

New User


Joined: 29 Jan 2007
Posts: 22
Location: India

PostPosted: Mon Jan 29, 2007 2:42 pm
Reply with quote

i am sorry,i mean the page number comes in the same line as the title
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Jan 29, 2007 3:00 pm
Reply with quote

Something like this should work:
INREC IFTHEN=(WHEN=(nn,6,CH,EQ,C' PAGE ?),OVERLAY=(1:C?0?)),
Back to top
View user's profile Send private message
appu.venkat

New User


Joined: 29 Jan 2007
Posts: 22
Location: India

PostPosted: Mon Jan 29, 2007 3:04 pm
Reply with quote

yes, will try it out...thx a lot
Back to top
View user's profile Send private message
appu.venkat

New User


Joined: 29 Jan 2007
Posts: 22
Location: India

PostPosted: Mon Jan 29, 2007 3:12 pm
Reply with quote

Code:

1                           XXX XXX TITLE XXX XXXXXXXXXX               PAGE    1
-                                                                               
0    xxxx - input rec -  xxxxxxxx
     xxxx - input rec -  xxxxxxxx


This is how i want my report to look like.I want to know how to simulate that '0' in the report.I am able to do the simulation of 1 and - through JCL.The first two lines are the headers and the third line where the '0' appears is the input record.the character '0' has to appear only while printing the first record of every new page.Any Suggestions please??
Back to top
View user's profile Send private message
appu.venkat

New User


Joined: 29 Jan 2007
Posts: 22
Location: India

PostPosted: Mon Jan 29, 2007 3:48 pm
Reply with quote

INREC IFTHEN=(WHEN=(nn,6,CH,EQ,C' PAGE ?),OVERLAY=(1:C?0?)),
This works if the character '0' has to be inserted in the same row as PAGE.But it is done in the next row.Any suggestions??
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Mon Jan 29, 2007 10:07 pm
Reply with quote

appu,

If you're creating the report with DFSORT, you can insert the ANSI carraige control characters directly using DFSORT control statements. Are you creating the report with DFSORT? If so, show your DFSORT control statements.

If you're not creating the report with DFSORT, then do you want to put a '0' in the first byte of the third line of every page in the existing report?
What is the RECFM and LRECL of your input file?
Back to top
View user's profile Send private message
appu.venkat

New User


Joined: 29 Jan 2007
Posts: 22
Location: India

PostPosted: Tue Jan 30, 2007 10:20 am
Reply with quote

hi Frank,
Yes i am creating the report using DFSORT.These are my DFSORT control statements.

Code:

  OPTION COPY                                 
  OUTFIL FNAMES=SORTOUT,                     
    LINES=57,REMOVECC,                         
    HEADER2=(1:'1',                             
       29:'AGNIS FILE MAINTENANCE MESSAGES',       
       76:'PAGE',86:PAGE=(EDIT=(IIT)),/,'-'),       
    OUTREC=(7:7,80,133:X)


This is wat i tried.This works good, but for the insertion of '0'.Hope this info will help u.Could u please gimme some suggestions.For the input file,RECFM=FB and LRECL=86.I tried overlay it does not seem to work.Wat is ur suggestion??
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue Jan 30, 2007 9:47 pm
Reply with quote

I'm a bit confused about what you're trying to do. It looks like you just need a specific number of blank lines between the header and the data. The ANSI carriage control characters with '-' and '0' you're using are one way to do it, but you can actually do the same thing with different carriage control characters using a space in position 1 of the first data record so you wouldn't have to overlay it with '0'.

How many blank lines do you want between the header and first data line? Show it like this:

Header
blank line
blank line
blank line
blank line
data
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
Search our Forums:

Back to Top