View previous topic :: View next topic
|
Author |
Message |
vaishalisingh
New User
Joined: 07 Feb 2008 Posts: 4 Location: delhi
|
|
|
|
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 |
|
|
Prajesh_v_p
Active User
Joined: 24 May 2006 Posts: 133 Location: India
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
gabriel.ryoga
New User
Joined: 07 Jun 2007 Posts: 31 Location: Spain
|
|
|
|
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 |
|
|
|