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
 

 

Sortout check for empty report

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

New User


Joined: 07 Feb 2008
Posts: 4
Location: delhi

PostPosted: Wed May 07, 2008 11:31 am    Post subject: Sortout check for empty report
Reply with quote

Hi,

In my first step i am sorting a particular report.

In my second step i have to check if the output of the sort step(previous) produced no records then Print "empty report" in that sortout file.

please advise !
Back to top
View user's profile Send private message

Prajesh_v_p

Active User


Joined: 24 May 2006
Posts: 133
Location: India

PostPosted: Wed May 07, 2008 2:46 pm    Post subject:
Reply with quote

Can you check this logic?

Step 1) Use IDCAMS to check empty report condition
PRINT INFILE(DDIN) COUNT(1) CHAR

If RC GT 0
Step 2) Copy "empty report" to sortout file
if RC EQ 0
Step 3) Sort the report

Thanks,
Prajesh
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 May 07, 2008 9:21 pm    Post subject:
Reply with quote

YOu can do this all with DFSORT/ICETOOL. You don't need IDCAMS.

See the "Set RC=12 or RC=4 if file is empty, has more than n records, etc" Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/

If that doesn't help, then show your first step.
Back to top
View user's profile Send private message
gabriel.ryoga

New User


Joined: 07 Jun 2007
Posts: 31
Location: Spain

PostPosted: Wed May 07, 2008 10:55 pm    Post subject:
Reply with quote

I think that this are the steps you need, just put in the STEP 2 a SORT to copy the text you need.

Code:

//STEP1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=...
//TOOLIN DD *
COUNT FROM(IN) EMPTY
/*
// IF STEP1.RC = 12 THEN
//*
//* STEP2 WILL RUN IF 'IN' IS EMPTY
//STEP2 EXEC ...
...
// ENDIF
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 Splitting of single report to seperat... abdulrafi TSO/ISPF 4 Mon Mar 27, 2017 3:59 pm
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts Easytrieve report shalem CA Products 4 Sun Feb 26, 2017 9:08 am
No new posts Can you write 2 recs on SORTOUT when ... Sysaron DFSORT/ICETOOL 6 Thu Feb 23, 2017 12:07 am
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm


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