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 to enter some characters inan empty file?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to enter some characters inan empty file?
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    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

Below link will help you
http://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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject: Reply to: How to enter some characters inan empty file?
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    Post subject:
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    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 editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm


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