Solved

writing a batch file to run reports

Posted on 2015-01-26
6
332 Views
Last Modified: 2015-01-26
I am looking to write a batch file to automatically run reports from a point of sale software program.  I know nothing of batch files but here is the batch file (see below) that was currently used (but it runs different reports).   how do I know which Y and N to use?  sorry for my lack of knowledge.  thanks

REM *Unknown Command
C:
cd\sc

REM *Unknown Command

REM *Sales Journal Report
PSNEWW 1 1 NNYNYNNNYNNNNYNN YNNNNNNNN N

REM *Sales Trend Report
SLTRENDW C 2 1
0
Comment
Question by:StewartGilligan
6 Comments
 
LVL 23

Expert Comment

by:NVIT
ID: 40571171
Is what you pasted the batch file that works originally?

Looks like it runs 2 things:
PSNEWW with various parameters
...and
SLTRENDW with various parameters

...how do I know which Y and N to use?
Are these "NNYNYNNNYNNNNYNN YNNNNNNNN N " your guesses or an actual working one?

Are PSNEWW and SLTRENDW also batch files? If so, you can open those files and possibly see what those parameters mean.
0
 

Author Comment

by:StewartGilligan
ID: 40571176
actually working now.  just wrong reports.....
0
 
LVL 23

Expert Comment

by:NVIT
ID: 40571181
Do you mean if you change the NY sequences, it runs or you expect it to run a different report? Have you tried changing it?
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 68

Expert Comment

by:Qlemo
ID: 40571204
That is something we cannot really help with, because the reports are proprietary, and the parameters do not have any meaning to us.
0
 
LVL 9

Accepted Solution

by:
Carlos Ijalba earned 500 total points
ID: 40571245

1.

What you should do is have a look at the program's manual and find out all the parameters, it looks clear to me that what you pass on to the executable is screen parameters and then just activate flags on or off via N or Y values.

2.

If you do not have the manual, just run a big batch running a report with a different flag each time, for example:
PSNEWW 1 1 NNNNNNNNNNNNNNNN NNNNNNNNN N
PSNEWW 1 1 NNNNNNNNNNNNNNNN NNNNNNNNN Y
PSNEWW 1 1 NNNNNNNNNNNNNNNN NNNNNNNNY N
PSNEWW 1 1 NNNNNNNNNNNNNNNN NNNNNNNYN N
PSNEWW 1 1 NNNNNNNNNNNNNNNN NNNNNNYNN N
PSNEWW 1 1 NNNNNNNNNNNNNNNN NNNNNYNNN N
...
etc.

That way you should find out what each option do, but it may not be very easy to identify.
0
 

Author Comment

by:StewartGilligan
ID: 40571323
thank you.  I kind of figured we would need a manual of some sort.  thanks
ps  I have another batch question so I guess I should start a different thread
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now