Hi everyone,
Can someone please help me how to skip the header when executing a SQL query in batch mode and writing it to a dataset. I will be validating the dataset further to check if it is empty or not.
Regards,
Rakesh MS
topic split
How to skip the header when executing a query in batch
-
- Posts: 30
- Joined: Thu Mar 30, 2017 2:09 pm
- Skillset: mainframe
- Referer: surfing
-
- Global moderator
- Posts: 3025
- Joined: Sun Jul 04, 2010 12:13 am
- Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
- Referer: Google
- Location: Pushing up the daisies (almost)
Re: How to skip the header when executing a query in batch
What header?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
Regards
Nic
-
- Posts: 30
- Joined: Thu Mar 30, 2017 2:09 pm
- Skillset: mainframe
- Referer: surfing
Re: How to skip the header when executing a query in batch
Hi Nicc,
I want only the value along with their respective columns to be in the output. I don't want the SQL statements and other generic messages in the output.
Just a sample of my output
1
1PAGE 1
***INPUT STATEMENT:
SELECT A.E058_PO_NBR, A.W001_RR_NBR,
'PO NOT FOUND' AS REMARKS
FROM LOWES.W001_PO_DAL_HDR A
WHERE
((A.E058_PO_NBR = 037532269 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 037532270 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
)
AND NOT EXISTS (
SELECT 1 FROM
LOWES.T7914_IPT_PO_HDR_OTB_EDI_SS T7914
WHERE T7914.PO_RFR_NBR = A.E058_PO_NBR);
+------------------------------------------------+
| E058_PO_NBR | W001_RR_NBR | REMARKS |
+------------------------------------------------+
1_| 37532269 | 1 | PO NOT FOUND |
+------------------------------------------------+
0SUCCESSFUL RETRIEVAL OF 1 ROW(S)
What I need in my output is just as below
+------------------------------------------------+
| E058_PO_NBR | W001_RR_NBR | REMARKS |
+------------------------------------------------+
_| 37532269 | 1 | PO NOT FOUND |
+------------------------------------------------+
Regards,
Rakesh MS
I want only the value along with their respective columns to be in the output. I don't want the SQL statements and other generic messages in the output.
Just a sample of my output
1
1PAGE 1
***INPUT STATEMENT:
SELECT A.E058_PO_NBR, A.W001_RR_NBR,
'PO NOT FOUND' AS REMARKS
FROM LOWES.W001_PO_DAL_HDR A
WHERE
((A.E058_PO_NBR = 037532269 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 037532270 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
OR (A.E058_PO_NBR = 002711657 AND A.W001_RR_NBR = 01 )
)
AND NOT EXISTS (
SELECT 1 FROM
LOWES.T7914_IPT_PO_HDR_OTB_EDI_SS T7914
WHERE T7914.PO_RFR_NBR = A.E058_PO_NBR);
+------------------------------------------------+
| E058_PO_NBR | W001_RR_NBR | REMARKS |
+------------------------------------------------+
1_| 37532269 | 1 | PO NOT FOUND |
+------------------------------------------------+
0SUCCESSFUL RETRIEVAL OF 1 ROW(S)
What I need in my output is just as below
+------------------------------------------------+
| E058_PO_NBR | W001_RR_NBR | REMARKS |
+------------------------------------------------+
_| 37532269 | 1 | PO NOT FOUND |
+------------------------------------------------+
Regards,
Rakesh MS
-
- Global moderator
- Posts: 3025
- Joined: Sun Jul 04, 2010 12:13 am
- Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
- Referer: Google
- Location: Pushing up the daisies (almost)
Re: How to skip the header when executing a query in batch
Please use the code tags when posting data, code, reports or anything else requiring a fixed pitch font.
To get what you want you need to post-process the output to remove the lines that you do not want.
To get what you want you need to post-process the output to remove the lines that you do not want.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
Regards
Nic
-
- Similar Topics
- Replies
- Views
- Last post
-
- 4
- 10186
-
by Misha786
View the latest post
Tue Jul 18, 2023 11:26 pm
-
-
Retrieve Subsystem Name executing under
by drowelf » Wed Feb 02, 2022 3:44 am » in Operating Systems - 0
- 1947
-
by drowelf
View the latest post
Wed Feb 02, 2022 3:44 am
-
-
-
Skip last 3 bytes and first 3 bytes of data in cobol
by senthamizh » Wed Dec 21, 2022 7:26 pm » in IBM Cobol - 2
- 1786
-
by Robert Sample
View the latest post
Thu Dec 22, 2022 9:18 am
-
-
- 1
- 1332
-
by jcdm
View the latest post
Mon Oct 24, 2022 6:10 pm
-
- 1
- 1247
-
by willy jensen
View the latest post
Sat Sep 04, 2021 12:51 am