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

How to enter some characters inan empty file?


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

New User


Joined: 13 Jan 2010
Posts: 15
Location: Hyd

PostPosted: Thu Feb 25, 2010 12:31 pm
Reply with quote

If i have a file and using DFSORT i found out that the file is empty.And i want to pass "No Records found" in the empty file.Can we use ICETOOL or ICEMAN utility to achieve it. icon_biggrin.gif
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Feb 25, 2010 12:38 pm
Reply with quote

Quote:
If i have a file and using DFSORT i found out that the file is empty

Post your existing job with current sortcard being used.
Back to top
View user's profile Send private message
Anshuman_Hyd

New User


Joined: 13 Jan 2010
Posts: 15
Location: Hyd

PostPosted: Thu Feb 25, 2010 12:46 pm
Reply with quote

SORT FIELD=COPY -
INREC IFTHEN=(WHEN=(1,1,CH,NE,C' '),
OVERLAY=(C'NO RCORDS IN HEADER :'26,1))

The sort card i hv used.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Feb 25, 2010 1:13 pm
Reply with quote

Below link will help you
www.ibmmainframes.com/viewtopic.php?t=30490&highlight=empty+file
Back to top
View user's profile Send private message
Anshuman_Hyd

New User


Joined: 13 Jan 2010
Posts: 15
Location: Hyd

PostPosted: Thu Feb 25, 2010 1:35 pm
Reply with quote

Hi can i get the structure of the JCL for step2 for which u have given the link.Coz till step 2 i hv already done it.But i m not getting how will i insert the line"Empty file" in th empty file.

Is there any other way of writting into the empty file other than Repro or Merging.

Please guide me !!!!1 icon_eek.gif
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Feb 25, 2010 2:46 pm
Reply with quote

Use this for step2.
Code:

//STEP02   EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*   
//SORTIN   DD *         
No Records found         
//SORTOUT  DD SYSOUT=*   
//SYSIN    DD *         
  SORT FIELDS=COPY       
/*                       

Even you can use IEBGENER for the same.
Back to top
View user's profile Send private message
Anshuman_Hyd

New User


Joined: 13 Jan 2010
Posts: 15
Location: Hyd

PostPosted: Thu Feb 25, 2010 2:51 pm
Reply with quote

Thnx a lot for the gr8 help
Back to top
View user's profile Send private message
Subhu_Chatterbox

New User


Joined: 25 Feb 2010
Posts: 12
Location: Hyd

PostPosted: Thu Feb 25, 2010 3:00 pm
Reply with quote

yes do the first step with ICETOOL, then follow the step2 as mentioned above, if RC=12
Back to top
View user's profile Send private message
Anshuman_Hyd

New User


Joined: 13 Jan 2010
Posts: 15
Location: Hyd

PostPosted: Thu Feb 25, 2010 5:05 pm
Reply with quote

For getting recturn code 4 we can use the below sort card tooo


COUNT FROM(IN) EMPTY USING(HDTL) RC4
/*
//HDTLCNTL DD *
OMIT COND=(5,1,CH,EQ,C' ')
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top